[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: copy partition from a remote server (success at least for me :)




According to Andrew Schulman,

Hi List!

The problem is the following:

The remote machine (sarge) has a hdd with 5GB data.
It's accessible via ssh over the web.
I want to make a partition backup from it to a hdd in my office
to be able to replace the remote hdd with the backup one if the remote hdd crashes (and no other installation is required).
I know that dd can do it locally.
But how to backup the hdd image remotely?
Bandwith is no problem ( for me :) )

scp remote:/dev/hdd hdd.img ?


Use rsync instead, if you can.  If sometime in the next
several hours you have a network failure, just issue the
rsync command again and it will pick up where it left off.

E.g...

  rsync -e 'ssh -C -c blowfish' -v user@remote:/dev/hddd hdd.img

or for newer versions, ssh is the default...

  rsync -vz user@remote:/dev/hddd hdd.img




Thanx for everyone who helped me!

I'm using the rsync with ssh  method and it's great for me.
I change 2 hdd-s to backup the whole remote system.

If I make big updates on the source than I make a full backup (the
same command, but I delete everything from the target ).
to the 2nd hdd, and if everything is ok than continue with the
incremental backups.


The commands are:
1.
Go to the new root (cd /mnt/targetdisk/tagetpartition )

2. To make a full backup:
ssh source.machine.com 'dump -0 -f - /' | restore -r -f -

3. To make incremental backup:
rsync -avx -e 'ssh -C' source.machine.com .
(The dot at the end is needed)

In this cases the ssh port is used and no need to open the rsync port on
the remote machine.

I experienced that the dump method is much faster for full backups than
rsync to an empty disk.


						Best regards






Reply to: