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:/ .