<div dir="ltr"><span id="docs-internal-guid-b187fe95-1a31-0eab-1445-63249b770b30"><p style="margin-top:0pt;margin-bottom:0pt"><font color="#000000" face="Arial"><span style="font-size:14.6666669845581px;line-height:20.2399997711182px;white-space:pre-wrap">Hello,</span></font></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">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. </span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><b style="font-weight:normal" id="docs-internal-guid-b187fe95-1a34-046a-7879-96cc5ab4ccba"><br></b></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Scenario:</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># mkdir -p source/b</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># rsync -a --backup --backup-dir=../backup source/ destination/</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># rm -rf source/b</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># rsync -a --backup --backup-dir=../backup source/ destination/</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># ls -la backup</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><b style="font-weight:normal"><br></b></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Backup-dir is empty. I expected to have â€˜b’ directory inside.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">How can we force rsync to backup empty directories to backup-dir in case of deletion?</span></p><div><br></div><div><br></div><div><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Best Regards</span></div><div><span style="font-size:14.6666666666667px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Adam Blaszczykowski</span></div></span></div>