Yet another rsync incremental thread

Matt McCutchen matt at
Sat Jul 19 18:13:59 GMT 2008

On Sat, 2008-07-19 at 15:45 +0200, Mac User FR wrote:
> For rsnapshot, OK, I understood now how to connect them. The "post- 
> xfer exec" I was looking  for don't exist on the rsync man page, but  
> on the rsyncd.conf which I've didn't look at (my fault :/ ). I think I  
> will not use rsnapshot because I don't like to use to many software  
> but only a small rotating script home made.
> Didn't finished the script yet, but it will do something like this:
> 1) Expected first state:
> backup (rsync transfer folder), lastest (previous transfer folder) and  
> <PCname><date> directories (old backup)
> 2) Execution of the script (pseudo code):
> get date
> get free disk space
> get backup size
> mv lastest -> <PCname><date>
> mv backup -> lastest
> while(free space < backup size) #disk almost full, need deleting some  
> old stuff
> 	get oldest backup folder name
> 	rm it
> That's all. The only thing I haven't coded yet is the while loop, but  
> I will do it next week.
> What could rsnapshot give me in addition to this? Would it manage free  
> space for many concurrent backups?
> Using my script for 2 or more backups, if the other backup takes  
> almost all disk, it won't be smart enough to delete backups from the  
> other backup. There are some other cases I should care about. But I  
> still have the impression rsnapshot would be too big stuff for only  
> this need.

Rsnapshot is similar to your script except that it retains a specified
fixed number of backups.  It has no feature to delete as many backups as
necessary to free the proper amount of disk space, but that could be
done pretty easily in a script that is invoked before (or after)
rsnapshot.  With multiple clients, it would not be hard to make the
script consider all the snapshot roots together when choosing the backup
to delete.  I think rsnapshot is not as heavy-weight as you believe, but
go ahead and use your own script if you find it easier to understand.

> In another hand, don't you think we could add the content of this  
> script (revised, of course) to make rsync a complete incremental  
> backup solution without needing 3rd part software? Isn't a good idea?

Why?  The goal of rsync is to copy files, not to be a complete
incremental backup solution by itself, even though several of its
options are motivated by this use case.  I think the current state of
affairs with a wide variety of available rsync-based backup solutions
(rsnapshot, dirvish, ccollect, various homegrown scripts including
yours, ...) is just fine.  Different users prefer different solutions,
so I don't think arbitrarily choosing one to include in rsync would be

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url :

More information about the rsync mailing list