On Mon, 27 Feb 2012 22:55:56 Carl Hartung wrote:
On Mon, 27 Feb 2012 17:59:09 +1300 michael@actrix.gen.nz wrote:
If you are going to use rsynce consider that you may want to use some additional options to make the copy more faithful to the original...
rsync -a -H -A -X -S /from/ /to/
See the man page.
Before going to 12.1 I used rsync to duplicate / to a spare partition (I always leave make two OS partitions on every drive - can't have too many now that disk is cheap). I then manually edited /etc/fstab /boot/grub/menu.1st to make sure it would boot, that way I could boot the upgraded 12.1 or the old 11.4. Note this was in addition to offline backups (also using rsync). If you brought a machine down to runlevel 1 it would be reasonably safe to just rsync the live machine.
Hi Michael,
Please don't 'top post' as reading (and posting) 'top to bottom' is the convention on this list.
It's been my experience that the '-a' flag creates totally "faithful" archives (a.k.a. backups,) in the use case presented by the OP.
What scenarios do you have in mind where the additional flags come into play? Is it 'normal' to find hard links in one's '/' or '/home' partitions? Ditto ACLs or extended attributes?
Clearly the additional flags you've recommended have a purpose. But I have yet to encounter a failed restoration from the archives I've been creating. Have I just been lucky? ;-) Are there any potential drawbacks?
TIA & regards,
Omitting any of the extra flags isn't likely to cause a system to fail in any major way. But if ls -l /bin /usr/bin you will see that some files are hard linked. Losing the association will burn a little space. As long as the package manager restores links when updating a package all will be well. I'd just rather avoid any confusion in the mean time because I sometimes have to manually hack my system (rare these days admittedly). As for ACL's or extended attributes, my main concern is that I'm not really aware whether any packages are using them or not. I preserve them just in case. The mount options for / normally include user_xattr,acl, so better safe than sorry. If anything has created a 4GB sparse file, I don't want to lose that space when I copy it (/ is only 20GB) - so I preserve sparse files. I want a faithful copy to be sure nothing will mysteriously or silently fail on me. But you are right, I bet almost all commonly used things will work just fine - but for a small cost I avoid making the bet. Sorry about breaking the conventions for the list - thanks for bringing to my attention. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org