I usually use rsync to do backups, with a command like this:
rsync -avxz -e "ssh" --exclude ".gvfs" --numeric-ids / /media/Backup/slash/
How can I convert the arguments I use with rysnc to rdiff-backup?
Update:
OK, I made myself a "shopping list".
rsync flags: avxz = rlptgoDvxz
rdiff-backup flags (not complete): --preserve-numerical-ids --exclude-other-filesystems --include-symbolic-links --include-special-files
Shopping list:
rsync flag rsync explanation rdiff flag?
-----------------------------------------------------------------------------------------------------------------------------
-r, --recursive recurse into directories
X -l, --links copy symlinks as symlinks # done by --include-symbolic-links (I hope)
-p, --perms preserve permissions
-t, --times preserve modification times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
X --devices preserve device files (super-user only) # Hopefully taken care of by --include-special-files
X --specials preserve special files # Hopefully taken care of by --include-special-files
X -x, --one-file-system don't cross filesystem boundaries # Done by --exclude-other-filesystems
X --numeric-ids don't map uid/gid values by user/group name #Done by --preserve-numerical-ids
So, what is left is how to preserve Permissions, Ownership, Groups, Modified times, and be recursive. I'm not sure if rdiff-backup already does this, since this is a backup, I need to be sure everything is taken care of, not just think everything is taken care of.
I've tried it a few times, but I haven't stumbled on the formula yet: I used
rdiff-backup -v5 --preserve-numerical-ids --include-symbolic-links --include-special-files --exclude-other-filesystems "root@2001:470:e89d:9ab6:21b:24ff:fe75:5822::/" /media/Backup/rdiff/bjorn-laptop/one_ext4/
to backup and
rdiff-backup -r now -v5 --preserve-numerical-ids --force /media/Backup/rdiff/bjorn-laptop/one_ext4/ "root@2001:470:e89d:9ab6:21b:24ff:fe75:5822::/media/2f52fa73-b3a6-46ef-8e1b-e82d983b0b7f_/"
to restore. After that, I tried modifying /etc/fstab on the restore with the new UUID and updating grub (with the new UUID) but I got errors about /dev, /sys, & /proc not being there. How can I use rdiff-backup so I only have to restore the backup, change /etc/fstab (on the restore) and update/install grub?