On Fri, Dec 13, 2019 at 7:44 PM Alan Stern via rsync <rsync@lists.samba.org> wrote: > What is the reason for this behavior? Is there any way for rsync to > preserve these attributes? If not, how can rsync be used to make a > reliable complete system backup?
[I'll touch only the "reliable complete system backup" topic.] For backups I regularly use `rdiff-backup` and `rsync` depending on the occasion. (`rdiff-backup` mainly for "regular usage" file-systems, meanwhile `rsync` for archival purposes, or "snapshots".) However, besides relying on them I always create an MD5 sums file before doing the backup, and copy that file as part of the backup. Also if I care a lot about the file-system meta data (i.e. anything besides the file name and file content), I employ a different tool depending on the occasion: * usually a simple `find` with proper `-printf` usage (including `%U %G %T@ %n %i %l`, etc.) which can help afterward easily recover meta-data or hard-links, etc.; * alternatively `rdup` can be used for this purpose; * any other tool that outputs the meta-data in machine-readable format; I do this because the file-system meta-data is so "brittle" that it can easily be "mangled" by even the simplest commands. Also, I don't know of any usage of such attributes. (Are you encountering an actual real-world use-case?) In fact I'm glad that `rsync` doesn't touch the immutable attribute, as such if I know that a certain folder was not touched, (and given that after a backup I always mark the backup files as immutable), it can serve as a fail-safe. Ciprian. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html