Jerry McAllister jerrymc at
Thu Oct 15 14:14:14 UTC 2009

On Wed, Oct 14, 2009 at 09:29:42PM -0400, PJ wrote:

> I believe that my problems arise out of subliminal refuse syndrome: the
> brain refuses to comprehend dump and restore TOs and FROMs.
> In other words, I'm beginning to see that
> dump -0af TO ( - or device/file) FROM (device or directory/file)
> and
> restore -rf  (TO curr.dir FROM device or file) 
> or
> dump -0af  - (FROM device or file) | restore  -rf - (TO device or directory)
> or do I still not have it right?
> It's the stdout and stdin that makes me stumble.
> Do I really need to mount the partitions or can I just dump and restore
> from device to device directly?
> The manual says I should be able to dump & restore across the lan too...

Basically. on dump, the filesystem to be dumped comes last 
on the command line.  
The place to write the dump is that which is named right after the -f
If there is no -f then it defaults to a tape device.
If a '-' follows the -f, then it writes to standard out.
The name must be the first thing after the -f or it will get confused.

On restore, there is no filesystem name to come last.  You have
to be cd-ed to where you want it written.  So, the only thing to
consider is its  -f.  For restore, that tells from where to read.
If it is a device or file name, it reads from that.  If it is  '-'
it reads from standard in.   If there is no -f it defaults to the
tape device.  
Again, the name must be the first thing after the -f if there is a -f.

The pipe '|' tells the system to take the standard out from the first
process and feed it to the standard in of the second.  That passing is 
not a function of dump/restore, but of the system.   The pipe just
passes data.  It doesn't force the utilities (dump or restore) to do
anything about it.   But, putting the '-' on dump and restore tells
them to pay attention to standard out/in.

You can cause dump to send standard out over the net and restore to
read standard in from the net.    I used to do that, but it has been
a long time and I don't have time at the moment to go and check the
details to make sure I tell it correctly.


> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list