Remote backup to image with rsync

  1. Create disk image file
    dd if=/dev/zero of=disk.image bs=1024 count=8388608
    8388608 is the size of the filesystem we will want, in kiloBytes. This one will be 8GB.
  2. Format to ext3
    mkfs.ext3 -F -b 1024 disk.image 8388608
  3. Mount
    mount -t ext3 -o loop disk1.image /tmp/disk1
  4. Sync the remote filesystem to the locally mounted image
    rsync -avz user@host.com:/ .

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">