Rsync creates empty directories with backup-dir option
pierre.willaime at protonmail.ch
Wed Jul 15 08:44:55 UTC 2015
With rsync 3.1.1 (on debian), using the "backup-dir" option creates a tree of empty folders inside the backup repository. This doesn't affect the transfer (all files and folder are copied anyway).
rsync -rtvhPx --delete --stats --exclude-from=/home/pierre/scripts/ExclusionRSync --backup --backup-dir=/media/pierre/g2/sauvegardes/fichiers_supprimes_pierre /home/pierre/ /media/pierre/g2/sauvegardes/sauvegarde_pierre
The previous command (launched the first time) recreates the whole structure of folders inside the "/media/pierre/g2/sauvegardes/fichiers_supprimes_pierre" backup-dir). These folders are empty and the files are present in "/media/pierre/g2/sauvegardes/sauvegarde_pierre"(destination).
It seems to be a bug because the backup directory should contains something if, and only if, I delete files or folder. But it is impossible to delete something during the first backup; nonetheless, the backup-dir is full of empty folder after the first call of rsync.
There are two unanswered messages on Unix.SE describing this bug ( and ). A quick search into this mailing list archives  doesn't show emails related to this question.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync