Sync files-from with delete

john espiro john_espiro at
Fri Jun 26 21:27:15 MDT 2015

----- Original Message -----
From: Simon Hobson <linux at>
To: "rsync at" <rsync at>
Sent: Friday, June 26, 2015 8:07 AM
Subject: Re: Sync files-from with delete

john espiro <john_espiro at> wrote:

> I have a local directory that I am trying to sync with a remote directory.  That's fine, but there's a lot of data that is out of sync so I decided to make a local copy of the difference to then bring to the remote location.
> So I ran a dry-run between the two to generate a list of files in listOfFiles.txt
> Then I ran rsync from local to localBackup.
> rsync -av --files-from=/tmp/listOfFiles.txt /var/MyData/ /USB/Backup/
> Now, while this is happening, I am still rsycning between my local and my remote.  So I re-generate the listOfFiles.txt, which contains less things to copy than before.... I'd like to delete anything in /USB/Backup that is not in the listOfFiles.txt

Does it matter ? Take your USB drive to the remote location, rsync the files - any that are the same will be skipped. Then you can resume resyncing remotely as normal.

The remote location is rather remote, so that wouldn't work in this particular case.

More information about the rsync mailing list