Subject: Re: rsync alternative?
To: Andy Ruhl <acruhl@gmail.com>
From: Stefan Schumacher <stefan@net-tex.de>
List: netbsd-help
Date: 11/02/2006 12:51:06
> I've been using rsync a while, and recently I've needed it to replace
> some files. I never noticed that it does not preserve BSD file flags.
>=20
> I use flags, so I need to preserve them.
>=20
> I'm using rsync to backup a 300 gig filesystem that's about 90% used
> and has about 75000 files. It's backing up to another locally attached
> disk which is 500 gigs. I use dump to send a subset of the data that I
> consider most important off the machine and somewhere else.
>=20
> I suppose I could write a script as part of the rsync process that
> sets flags on the other filesystem to ensure they stay there, but that
> seems kind of clumsy.
>=20
> What is a good alternative that reasonably preserves rsync's efficiency?

I use rsync and rdiff-backup for backups, but only for homedirs, which do n=
ot use file flags.
However, mtree(8) can be used to generate a fingerprint of a filesystem, in=
cluding flags.
Mtree can also be used to update a filesystem structure to match that finge=
rprint.=20
So you could use mtree(8) to make a fingerprint of the original file and ap=
ply that fingerprint to the backup dir.=20
But test if it works  - and if it works, pleas send me copy of that skript,=
 so I can add it to my backup guide ;-)