Re: rsync alternative?
"Stefan Schumacher"<[email protected]>
| Newsgroups | gmane.os.netbsd.help |
|---|---|
| Message-ID | <[email protected]> |
> 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. > > I use flags, so I need to preserve them. > > 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. > > 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. > > 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 not use file flags. However, mtree(8) can be used to generate a fingerprint of a filesystem, including flags. Mtree can also be used to update a filesystem structure to match that fingerprint. So you could use mtree(8) to make a fingerprint of the original file and apply that fingerprint to the backup dir. 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 ;-)