On Tue, Nov 23, 2010 at 4:56 AM, Thomas Ronner <tho...@ronner.org> wrote: > On 11/23/10 1:45 PM, Andrew Reilly wrote: >> No, I don't like tar, rsync and friends for backups: they don't >> deal well with hard links, special files or sparse files. > > rsync -avHxS --delete --numeric-ids /src/. /dst/. > > Handles sparse files (S) and hard links (H). Never had any trouble with > special files. What sort of special files are not handled correctly by > rsync? I'd like to know because I'm relying on rsync for backups for years > on my home network.
One problem with using rsync when dealing with hard-linked files: it doesn't like it when the source switches from hard-linked to non-hard-linked files. You end up with a mix of hard-linked and non-hard-linked files in the destination, with the contents of the non-hard-linked files all mixed around. We just discovered this when we upgraded our Debian 4.0 (Etch) boxes to Debian 5.0 (Lenny). On Etch, all the gzip tools are hard-links (zcat, zless, gzip, gunzip, etc). On Lenny, they are all separate files, and most are just shell scripts that use gzip. Doing an rsync of a Lenny box onto a directory from an Etch box, you end up with some hard-linked files, some regular files, and the contents of all the files are mixed-up based on which source file (script or binary) was read first. We've had to resort to clearing out the backups directory when doing a Debian upgrade, in order to guarantee that we get a clean backup via rsync. -- Freddie Cash fjwc...@gmail.com _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"