Some resources for setting up backups:
rsync -aAXv /* /path/to/backup/folder --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*",/lost+found}
rsync -WavxHAX --delete-excluded --progress \ /mnt/from/ /mnt/to/ --exclude='/home/*/.gvfs' \ --exclude='/home/*/.local/share/Trash' \ --exclude='/var/run/*' \ --exclude='/var/lock/*' \ --exclude='/lib/modules/*/volatile/.mounted' \ --exclude='/var/cache/apt/archives/*' \ --exclude='/home/*/.mozilla/firefox/*/Cache' \ --exclude='/home/*/.cache/chromium'\ --exclude='/home/*/.thumbnails' \ --exclude=.cache --exclude Cache --exclude cache #these last three prevent deletion of directories
/etc/ssh/sshd_config
--numeric-ids
or they will be translated for the host system of the hard drive-x
one filesystem -W
don’t try to be clever with sending partial files-H
hard links -A
ACL’s -X
extended attributesrootdest=root@john:/mnt/ sudo rsync -avxWHAX --delete --numeric-ids -e "ssh -c arcfour" /* $rootdest \ --exclude='/home/*' \ --exclude='/dev/*' \ --exclude='/proc/*' \ --exclude='/sys/*' \ --exclude='/tmp/*' \ --exclude='/run/*' \ --exclude='/mnt/*' \ --exclude='/media/*' \ --exclude=/lost+found \ --exclude='/var/run/*' \ --exclude='/var/lock/*' \ --exclude='/oldboot/*' \ --exclude='/etc/fstab' \ --exclude='/var/cache/apt/archives/*'
update-grub
homedest=root@john:/homeback/ rsync -avxWHAX --delete --numeric-ids -e "ssh -c arcfour" /home/* $homedest \ --exclude='/home/*/.gvfs' \ --exclude='/home/*/.local/share/Trash' \ --exclude='/home/*/.mozilla/firefox/*/Cache' \ --exclude='/home/*/.cache/chromium' \ --exclude='/home/*/.thumbnails'