Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread Jerry McAllister
On Tue, Jan 29, 2008 at 04:36:41PM +0100, Mel wrote:

> On Tuesday 29 January 2008 15:50:21 Alex Zbyslaw wrote:
> > Mel wrote:
> > >man restore:
> > >-r  Restore (rebuild a file system).
> > >
> > >This will recreate the filesystem, meaning, the files extracted will have
> > >identical inode numbers as on the original filesystem. Thus, you will very
> > >likely run into problems when using this mode.
> > >
> > >You're looking for -x, which extracts a dump file, similar to a tar,
> > > restoring ownership, file times and so on, but leaving the inode numbers
> > > up to the OS.
> > >
> > >restore -x is essentially what OP did interactively.
> >
> > Err, no.  Not unless it changed recently and this text is still
> > apparently present in 8-CURRENT (according to the Web interface).
> >
> >  From the man page BUGS section (though it's been there so long it's a
> > feature, in my book and belongs better with the -r option to prevent
> > exactly the confusion you've experienced).
> 
> Ever tried -r in a directory on a non-new filesystem? I don't recall the 
> exact 
> error, but it can clash. Done restore -x for testing ever since.

Done so many times.   Never had a problem with it.

jerry

> 
> >  A level zero dump must be done after a full restore.  Because restore
> >  runs in user code, it has no control over inode allocation; thus a
> > full dump must be done to get a new set of directories reflecting the new
> > inode numbering, even though the contents of the files is unchanged.
> 
> Ah, maybe it's the directories that contain the inode numbers of the old 
> filesystem. Whatever the cause - restore -r *should* only be used on a 
> newfs(8)'d filesystem.
> -- 
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread Jerry McAllister
On Tue, Jan 29, 2008 at 03:29:49PM +0100, Mel wrote:

> On Tuesday 29 January 2008 10:23:29 cpghost wrote:
> > On Mon, Jan 28, 2008 at 06:25:32PM -0500, C Thala wrote:
> > > > However, I don't have an actual live filesystem available to test this
> > > > oncan I just restore to a directory on an existing fs to be sure?
> > > > Is this even possible?
> > >
> > > Never mind...to answer my own question, I had to use the "add" feature
> > > in the interactive shell, i.e.:
> > >
> > > $ restore -i -f dump
> > > restore > add etc
> > > restore > extract
> >
> > If you want to test the *entire* dump file, you can also
> > use -r. Just make an empty directory somewhere, cd(1)
> > into it, and restore the dump there:
> >
> > % mkdir /path/to/new/dir
> > % cd /path/to/new/dir
> > % restore -r -f /path/to/old/dumpfile
> 
> man restore:
> -r  Restore (rebuild a file system).
> 
> This will recreate the filesystem, meaning, the files extracted will have 
> identical inode numbers as on the original filesystem. Thus, you will very 
> likely run into problems when using this mode.
> 
> You're looking for -x, which extracts a dump file, similar to a tar, 
> restoring 
> ownership, file times and so on, but leaving the inode numbers up to the OS.
> 
> restore -x is essentially what OP did interactively.

No.   restore -r is the correct one to use if you want to restore the
whole dump in to a directory.   You can also use restore -x, but that
is generally intended to restore named files/directories.

If you want to do that, it is often easier doing a restore -i which
the OP mentioned doing above.

jerry

> -- 
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread Mel
On Tuesday 29 January 2008 15:50:21 Alex Zbyslaw wrote:
> Mel wrote:
> >man restore:
> >-r  Restore (rebuild a file system).
> >
> >This will recreate the filesystem, meaning, the files extracted will have
> >identical inode numbers as on the original filesystem. Thus, you will very
> >likely run into problems when using this mode.
> >
> >You're looking for -x, which extracts a dump file, similar to a tar,
> > restoring ownership, file times and so on, but leaving the inode numbers
> > up to the OS.
> >
> >restore -x is essentially what OP did interactively.
>
> Err, no.  Not unless it changed recently and this text is still
> apparently present in 8-CURRENT (according to the Web interface).
>
>  From the man page BUGS section (though it's been there so long it's a
> feature, in my book and belongs better with the -r option to prevent
> exactly the confusion you've experienced).

Ever tried -r in a directory on a non-new filesystem? I don't recall the exact 
error, but it can clash. Done restore -x for testing ever since.

>  A level zero dump must be done after a full restore.  Because restore
>  runs in user code, it has no control over inode allocation; thus a
> full dump must be done to get a new set of directories reflecting the new
> inode numbering, even though the contents of the files is unchanged.

Ah, maybe it's the directories that contain the inode numbers of the old 
filesystem. Whatever the cause - restore -r *should* only be used on a 
newfs(8)'d filesystem.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread Alex Zbyslaw

Mel wrote:


man restore:
-r  Restore (rebuild a file system).

This will recreate the filesystem, meaning, the files extracted will have 
identical inode numbers as on the original filesystem. Thus, you will very 
likely run into problems when using this mode.


You're looking for -x, which extracts a dump file, similar to a tar, restoring 
ownership, file times and so on, but leaving the inode numbers up to the OS.


restore -x is essentially what OP did interactively.
 

Err, no.  Not unless it changed recently and this text is still 
apparently present in 8-CURRENT (according to the Web interface).


From the man page BUGS section (though it's been there so long it's a 
feature, in my book and belongs better with the -r option to prevent 
exactly the confusion you've experienced).


A level zero dump must be done after a full restore.  Because restore
runs in user code, it has no control over inode allocation; thus a full
dump must be done to get a new set of directories reflecting the new
inode numbering, even though the contents of the files is unchanged.

(The only bug here is that "is unchanged" should be "are 
unchanged" since "contents" is plural.  Or you could singularise to 
"content").


In addition, if all you are doing is *testing* the dump then -rN in any 
directory you please will work as well, since nothing gets extracted.  
Useful if you're just concerned about tape errors and the like.


--Alex



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


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread Mel
On Tuesday 29 January 2008 10:23:29 cpghost wrote:
> On Mon, Jan 28, 2008 at 06:25:32PM -0500, C Thala wrote:
> > > However, I don't have an actual live filesystem available to test this
> > > oncan I just restore to a directory on an existing fs to be sure?
> > > Is this even possible?
> >
> > Never mind...to answer my own question, I had to use the "add" feature
> > in the interactive shell, i.e.:
> >
> > $ restore -i -f dump
> > restore > add etc
> > restore > extract
>
> If you want to test the *entire* dump file, you can also
> use -r. Just make an empty directory somewhere, cd(1)
> into it, and restore the dump there:
>
> % mkdir /path/to/new/dir
> % cd /path/to/new/dir
> % restore -r -f /path/to/old/dumpfile

man restore:
-r  Restore (rebuild a file system).

This will recreate the filesystem, meaning, the files extracted will have 
identical inode numbers as on the original filesystem. Thus, you will very 
likely run into problems when using this mode.

You're looking for -x, which extracts a dump file, similar to a tar, restoring 
ownership, file times and so on, but leaving the inode numbers up to the OS.

restore -x is essentially what OP did interactively.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-29 Thread cpghost
On Mon, Jan 28, 2008 at 06:25:32PM -0500, C Thala wrote:
> > However, I don't have an actual live filesystem available to test this
> > oncan I just restore to a directory on an existing fs to be sure?
> > Is this even possible?
> 
> Never mind...to answer my own question, I had to use the "add" feature
> in the interactive shell, i.e.:
> 
> $ restore -i -f dump
> restore > add etc
> restore > extract

If you want to test the *entire* dump file, you can also
use -r. Just make an empty directory somewhere, cd(1)
into it, and restore the dump there:

% mkdir /path/to/new/dir
% cd /path/to/new/dir
% restore -r -f /path/to/old/dumpfile

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: restore(1) dumpfile to directory rather than filesystem -- possible?

2008-01-29 Thread Wojciech Puchar

On a 6.2 system, I am making some backups using dump(1)

I would like to test the integrity of these dumpfiles by using
restore(1) to restore them.

However, I don't have an actual live filesystem available to test this
oncan I just restore to a directory on an existing fs to be sure?


of course. only dump requires raw filesystem, restore operates on files 
only

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


Re: restore(1) dumpfile to directory rather than filesystem -- possible? -- SOLVED

2008-01-28 Thread C Thala
> However, I don't have an actual live filesystem available to test this
> oncan I just restore to a directory on an existing fs to be sure?
> Is this even possible?

Never mind...to answer my own question, I had to use the "add" feature
in the interactive shell, i.e.:

$ restore -i -f dump
restore > add etc
restore > extract
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"