Versioning in rsync

Matt McCutchen hashproduct at verizon.net
Fri Mar 31 18:14:55 GMT 2006


On Fri, 2006-03-31 at 19:38 +0200, W wrote:
> When syncing files from client to server, one would have on server, for
> example, three last verisons of synced files.

Rsync has a --backup option that you can use to create single backups of
overwritten files on the server.  Rsync won't maintain multiple backups
per file on its own, but you can have it use a different backup suffix
or backup directory on each run.

I can't think of an easy way to keep the last three distinct versions of
each file, but keeping a file as it existed during each of the last
three synchronizations is easy: fill and rotate three separate backup
dirs.  In fact, rsnapshot does just this.

-- 
Matt McCutchen
hashproduct at verizon.net
http://hashproduct.metaesthetics.net/



More information about the rsync mailing list