Empty directories aren't backed up in backup-dir

Adam Błaszczykowski adam.blaszczykowski at gmail.com
Wed Nov 18 10:46:53 UTC 2015


We have strange issue with rsync and backup-dir option. In case of having
empty directories and deleting them, those directories are not backed up in
backup-dir directory. Directories are backed up only if contains files.


# mkdir -p source/b

# rsync -a --backup --backup-dir=../backup source/ destination/

# rm -rf source/b

# rsync -a --backup --backup-dir=../backup source/ destination/

# ls -la backup

Backup-dir is empty. I expected to have ‘b’ directory inside.

How can we force rsync to backup empty directories to backup-dir in case of

Best Regards
Adam Blaszczykowski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20151118/a8081fb3/attachment.html>

More information about the rsync mailing list