Find the hard drive to backup. Notice that the hard drive is only the letters and not the number since the number is the partitions.
df -hRun from remote computer
sudo dd if=/dev/sda | gzip -1 - | ssh user@local dd of=image.gzRun from local computer
sudo ssh user@remote "dd if=/dev/sda | gzip -1 -" | dd of=image.gz
Methods for monitoring?
- Login via
ssh
in another terminal andls -l
the file to see what it's size is. - You can use
pv
to monitor the progress of a large dd operation, for instance, for the remote example above, you can do:
$ dd if=/dev/sda | gzip -1 - | pv | ssh user@local dd of=image.gz
- Send a "SIGUSR1" signal to
dd
and it will print stats. Something like:
$ pkill -USR1 dd