Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3920  / 1 Year ago, sun, february 26, 2023, 12:24:42

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?


More From » backup

 Answers
5

I think you are being bit by this bug:



http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397413



Assuming your target disk is mounted at /mnt/foo You probably just need to do



mkdir /mnt/foo/dev /mnt/foo/sys /mnt/foo/proc 


There's also a patch for this bug at http://thread.gmane.org/gmane.comp.sysutils.backup.rdiff-backup.general/6452, but it will try to list remote filesystems.


[#43167] Monday, February 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingsta

Total Points: 391
Total Questions: 103
Total Answers: 124

Location: Bonaire
Member since Wed, Mar 29, 2023
1 Year ago
ingsta questions
Sun, Oct 23, 22, 01:42, 2 Years ago
Sat, Oct 30, 21, 11:27, 3 Years ago
Sun, Nov 28, 21, 12:49, 2 Years ago
;