Can I get rsync to delete missing files first?
allistar.m at gmail.com
Wed Sep 16 21:14:27 MDT 2009
Matt McCutchen wrote:
> On Thu, 2009-09-17 at 14:41 +1200, Allistar wrote:
>> I am backing up a remove partition which is 38Gb onto a local partition
>> which is 40Gb. Rsync is complaining that I have run out of disk space on
>> the local partition, and I can tell that this would not happen if local
>> files that are missing in the remote system were deleted BEFORE copying
>> down new files.
>> I note there is a --delete-after option, but is there a --delete-before
> Yes, there is!
No according to the man page installed on my computer.
I suspect that my issue is that I have a warning about not having access to
a remote directory (lost+found) and I think the behaviour is that when any
errors like this happen, no deleting will occur. After changing the
permissions of that remote folder the rsync is now working as expected
without any out of disk space issues.
More information about the rsync