Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2009 10:13:21 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        PJ <af.gourmet@videotron.ca>
Cc:        Manolis Kiagias <sonicy@otenet.gr>, Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: clone-dump-restore
Message-ID:  <20091015141321.GA54613@gizmo.acns.msu.edu>
In-Reply-To: <4AD67B06.9090408@videotron.ca>
References:  <4AD640F5.20303@videotron.ca> <20091015000740.53ccdd0a.freebsd@edvax.de> <4AD67B06.9090408@videotron.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

////jerry


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091015141321.GA54613>