I just noticed that there is a discrepancy between version 3.0.9 and 3.1.0 of rsync.
Running the command
$ rsync -a --delete --backup --backup-dir=../old source/ dest/
with version 3.1.0 gives the output
Created backup_dir ../old/
even when no files are copied to the backup directory. I usually add the current time to the backup directory name, which means I end up with many empty directories. With version 3.0.9 of rsync, a backup directory was only created if needed.
My questions are:
- Is this an intended behaviour, and if so, is it possible to suppress the creation of empty backup directories?
- Can I install version 3.0.9 of rsync alongside with version 3.1.0 such that one is called say rsync309 and the other one rsync310, and then have an alias linking rsync to either of the two (which in my case means that I would keep using rsync 3.0.9 as I found this new behaviour annoying)?
Best Answer
Yes, this was intended behavior. Bug no 11423 was filed about it, and it was changed back in version 3.1.2.
https://bugzilla.samba.org/show_bug.cgi?id=11423#c12 :
While most distributions don't provide packages for version 3.1.2 yet, it is really quick and easy to compile: I did the following on Debian Jessie, and it went fine, installing the new version into
/usr/local/bin
:If you use it as a daemon, your init script may call it by it's full path, so you may also want to replace it with a link to the new version:
Update: If you are on Debian Jessie, you can actually just install the rsync package from Debian Stretch :