Confused by restore(8) man page example
Jerry McAllister
jerrymc at msu.edu
Mon Mar 4 15:27:49 UTC 2013
Subject: Re: Confused by restore(8) man page example
On Mon, Mar 04, 2013 at 10:08:37AM +0000, Steve O'Hara-Smith wrote:
> On Mon, 04 Mar 2013 01:47:24 -0800
> "Ronald F. Guilmette" <rfg at tristatelogic.com> wrote:
>
> >
> > In the man page for restore(8) I see the following:
> >
> > The -r flag ... can be detrimental to one's health if
> > not used carefully (not to mention the disk). An example:
> >
> > newfs /dev/da0s1a
> > mount /dev/da0s1a /mnt
> > cd /mnt
> >
> > restore rf /dev/sa0
> >
> > Personally, I utterly fail to see what point the author is attempting
> > to illustrate with the above example. I mean what part of this, exactly,
> > may be "detrimental to one's health" ? It's an enigma to me.
>
> There's nothing wrong with the example. I think "An example:"
> should be in a new paragraph to make it clear that it is not related to
> the warning. The detrimental effects cut in when you use -r on a filesystem
> that is not pristine, or at least in the expected state for restoring an
> incremental dump.
This and the previous reply are correct. This example shows
a correct way to use 'restore -r'
The '-r' flag causes it to write where you are cd-ed to without any
warning what you are doing or overwriting. If there are other files
in the directory that is to receive the files from a 'restore -r' has
other files, you may unexpectedly overwrite some of them. Also, if
you are not cd-ed in to the correct place (the mount point, for example)
using the '-r' will quickly write all over whatever directory you
are cd-ed to without warning. In other words '-r' causes it to
splat out everything right where you are without warning and too fast
to interrupt it before too much damage is done.
I often do a 'restore -r' into an existing -eg not newly newfs-ed,
directory, but have to make sure I am clear about what I am doing.
For example, I usually keep a large (large for my little stuff)
drive mounted as '/work'. Within that filesystem I may create
a directory such as './unroll' eg '/work/unroll' or some other
similar name and mass restore a dump in to it using 'restore -r'
so I can easily shuffle files around from the backup in to several
new directories. If there are a bunch of destination directories,
it is easier this way than doing a 'restore -i'. But, as said, I
have to be careful just how I am using it. It works well.
Have fun,
////jerry
>
> --
> Steve O'Hara-Smith <steve at sohara.org>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list