Backing up an image...

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, boot from MMC.

I use the method from

http://www.sanitarium.net/golug/rsync_backups.html

for incremental backups. Don't forget to mount your rootfs to a second
place because of all the mounts that might hide parts of it. Works like
a charm with this script which must be run as root in order to preserve
user ids:

#!/bin/bash
PREVIOUS=`readlink current`
NEW=`date --iso-8601=sec`
OPTIONS="-PavH --numeric-ids --delete"

echo "new backup tag is $NEW"

if [ ! "$PREVIOUS" ]; then
    echo "previous backup not found, starting fresh"
else
    echo "making incremental backup based on $PREVIOUS"
    cp -al "$PREVIOUS" "$NEW"
fi

if ! ssh root at yourdevice "mkdir /tmp/backup-mnt ; mount /dev/mmcblk0p2
/tmp/backup-mnt"; then
    echo "Could not mount /dev/mmcblk0p2 /tmp/backup-mnt"
    exit 1
fi

echo rsync $OPTIONS root at yourdevice:/tmp/backup-mnt/ "./$NEW"

if rsync $OPTIONS root at yourdevice:/tmp/backup-mnt/ "./$NEW"; then
    ln -snf $NEW current
fi

ssh root at yourdevice "umount /tmp/backup-mnt && rmdir /tmp/backup-mnt"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFG6P2t9ZPu6Yae8lkRAm40AJ9qcyGPIIh8yNIBHHm3BnazBu6sQwCeOFTf
XOyKuTqq/lCCm5Y1B+owNlY=
=FG2H
-----END PGP SIGNATURE-----



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux