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 option? If not, can I simulate this somehow? This is rsync version 2.6.2 protocol version 28 Thanks, Allistar.
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 > option?Yes, there is! -- Matt
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 > option? If not, can I simulate this somehow? > > This is rsync version 2.6.2 protocol version 28Oops, I didn't notice the really old rsync version. In rsync 2.6.2, just use --delete to "delete before". If you are doing that and are still running out of disk space, something else may be wrong. -- Matt
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 >> option? > > 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. Thanks.