On 5/3/05, Mark Knecht <[EMAIL PROTECTED]> wrote:
> Hi,
>    Can anyone here think of a way to back up remote partitions before
> installing Gentoo? Is there some way to run a command like dd but pipe
> the output it back to my local machine? What other info might I need
> to restore the remote machine later? I figure I'll save the partition
> information from fdisk. Anything else?

If the remote partition is mountable, I think you'll be better off by
taking a tar copy of the file system so that you're not constrained to
restoring it on the exact same size.

Try something like this from your "local" machine (assuming the other
machine is called "remote"):

ssh [EMAIL PROTECTED] '(cd /src && tar zcfp - .)' > backup.tar.gz

(You can omit the 'z' option if compression isn't important.)

If you do want to transfer the entire partition, I would recommend you
restore the data using a reverse of the above from a loopback mount of
that partition file (see the mount man page). This has the added
advantage that is allows you to change the filesystem type and/or
parameters of the target disk rather than just dumping over the old
partition.

However, to transfer the entire partition, you could do something like this:

ssh [EMAIL PROTECTED] cat /dev/sdc7 > mypartition

or compress it as well (on the remote side) using:

ssh [EMAIL PROTECTED] 'cat /dev/sdc7 | gzip -9' > mypartition.gz

Disclaimer: all of this is untested, but it shouldn't be too far off
from a usable solution :-)

Hope this helps,
Andreas

-- 
gentoo-user@gentoo.org mailing list

Reply via email to