Re: Confused by restore(8) man page example

2013-03-04 Thread Matthias Apitz
El día Monday, March 04, 2013 a las 01:12:41PM -0800, Ronald F. Guilmette 
escribió:

> I'm thinking:  If it is worth putting a warning into the man page,
> perhaps it is worth putting a warning into the code itself, to
> protect the unwary.
> 
> Anybody here ever used Clonezilla?  A nice useful tool.
> 
> When Clonezilla runs, and when it is just about to overwrite a target
> drive, it first asks you explicitly "Do you really want to proceed (Y/n)?"
> 
> After you respond "Y" it asks you again, one more time, the same question.
> 
> I for one have never felt put upon by these safety catches.  I know they
> are there for my own protection. ...

In the old days of UNIX V7 when newfs(8) was still mkfs(8), there was
also a last and final question "Last chance before scribbling on disk."
to answer. And even after you hit ENTER to confirm, there was an
internal wait of some 5 secs to let you interrupt with Ctrl-C in case
of error. Just remembering those days :-)

matthias
-- 
Matthias Apitz   |  /"\ ASCII Ribbon Campaign: www.asciiribbon.org
E-mail: g...@unixarea.de |  \ / - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |   X  - No proprietary attachments
phone: +49-170-4527211   |  / \ - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Confused by restore(8) man page example

2013-03-04 Thread Ronald F. Guilmette

In message <20130304151707.gc76...@jerrymc.net>, 
Jerry McAllister  wrote:

>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.

I'm thinking:  If it is worth putting a warning into the man page,
perhaps it is worth putting a warning into the code itself, to
protect the unwary.

Anybody here ever used Clonezilla?  A nice useful tool.

When Clonezilla runs, and when it is just about to overwrite a target
drive, it first asks you explicitly "Do you really want to proceed (Y/n)?"

After you respond "Y" it asks you again, one more time, the same question.

I for one have never felt put upon by these safety catches.  I know they
are there for my own protection.

Maybe restore should have something similar, along with some special
option to disable the extra security check, you know, for use in
non-interactive batch scripts.

>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 understand.

This is quite obviously different than "rm -fr *", but I can see how
it could be equally disasterous.


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Confused by restore(8) man page example

2013-03-04 Thread Ronald F. Guilmette

In message <63618304-837e-4b76-8157-d99c744ac...@wolfhut.org>, 
Ben Cottrell  wrote:

>I guess the same text in the man page could be read several
>different ways! The way I read it (which may or may not be
>correct) is that the example given is an example of how to
>use it *correctly*. It sounds to me like it's warning against
>deviating too far from the steps given in the example.
>
>I can see as how the text might allow other interpretations,
>though!

Thanks for the response Ben.

As others have pointed out, it would probably be less confusing
if the material starting with "An example:" were in a different
paragraph.  As the text stands now, first we have a sentence that
gives a frightening warning about possible mangling of a disk/partition
if restore -r is not used correctly, and then immediately following
that is "An example:" with an example of _correct_ usage.

I hope and trust that folks can understand my earlier befuddlement.

Anyway, I have just now filed a PR suggesting a new paragraph at the
appropriate point in the man page.

Thanks to all who responded.


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Confused by restore(8) man page example

2013-03-04 Thread Jerry McAllister
Subject: Re: Confused by restore(8) man page example

On Mon, Mar 04, 2013 at 10:08:37AM +, Steve O'Hara-Smith wrote:

> On Mon, 04 Mar 2013 01:47:24 -0800
> "Ronald F. Guilmette"  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 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Confused by restore(8) man page example

2013-03-04 Thread Steve O'Hara-Smith
On Mon, 04 Mar 2013 01:47:24 -0800
"Ronald F. Guilmette"  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.

-- 
Steve O'Hara-Smith 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Confused by restore(8) man page example

2013-03-04 Thread Ben Cottrell
On Mar 4, 2013, at 01:47, "Ronald F. Guilmette"  wrote:
> All I see is a pre-existing BSD partition being explicitly newfs'ed and
> then mounted, followed by some stuff being restored to that (clean)
> BSD partition from whatever is currently sitting on the tape drive
> called /dev/sa0.
> 
> So?  What possible problem could derive from merely that?  I don't see
> any.

I guess the same text in the man page could be read several
different ways! The way I read it (which may or may not be
correct) is that the example given is an example of how to
use it *correctly*. It sounds to me like it's warning against
deviating too far from the steps given in the example.

I can see as how the text might allow other interpretations,
though!

~Ben
(who is always careful to avoid using out-of-range values
 with mktime() when setting up lunch with promptness sticklers
 in Riyadh...)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Confused by restore(8) man page example

2013-03-04 Thread Ronald F. Guilmette


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.

All I see is a pre-existing BSD partition being explicitly newfs'ed and
then mounted, followed by some stuff being restored to that (clean)
BSD partition from whatever is currently sitting on the tape drive
called /dev/sa0.

So?  What possible problem could derive from merely that?  I don't see
any.

What's the problem?  I'm confused.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"