I’m looking to copy only new files from the source to the destination without deleting any files from the source.
Essentially, I’d like new files to be created on the source. Say the source contains files A and B and the destination has nothing. It should copy files A and B to the destination - obviously.
Source | Dest
A B | A B
But what if I delete A and B from the destination and add file C to the source? I’d ultimately like that to look like this:
Source | Dest
A B C | C
Is that possible with rclone? I’d like to eventually create a cron job to periodically check this and sync.
Sync never deletes files from SOURCE. It only deletes files from DEST. Sync does exactly what is implied. It makes DEST match exactly what is in SOURCE.
If you don’t want anything to be deleted in DEST, use rclone copy
Imagine you had a seedbox (source) and you wanted it to copy files to your desktop PC (destination), but you wanted to keep the remote files (source) on the seedbox to continue seeding regardless of the changes made on your local PC. So, on your desktop PC (destination) you could delete, move, or otherwise manipulate those files without those files being continuously copied back to the PC by rclone.
Rclone would only copy new files from the seedbox that haven’t previously been copied to the PC.
To accomplish what you’re asking, I would write a wrapper script that uses the COPY functionality to copy files from SOURCE to DEST. After the copy is complete, I would write the directory listing to a file and then use --exclude-from option to exclude those files that exist in that file you just created when you run subsequent copies. That way, files that were copied the last time around wont be copied again.