How to copy/move files without replacement

56 Views Asked by At

I have a backup of all of my data in two separate places. Usually the workflow is analyzing/modifying the data in one place and then backing it up by simply copying it to the other location. As data accumulates this gets slower and slower. I was wondering if there was a way when backing up to only copy over those files that don't already exist to the new location. Selecting the newer files manually isn't possible because they are organized in a really complex scheme of directories.

What comes to mind is when you drag and drop files between two locations and it prompts you when you find directories of the same name. Basically, I want to merge all the directories but not replace any files if they already exist in the backup location.

1

There are 1 best solutions below

0
On

Rsync (https://rsync.samba.org/) may meet your needs. From https://en.wikipedia.org/wiki/Rsync:

rsync is a utility for efficiently transferring and synchronizing files across computer systems, by checking the timestamp and size of files. It is commonly found on Unix-like systems and functions as both a file synchronization and file transfer program. The rsync algorithm is a type of delta encoding, and is used for minimizing network usage. Zlib may be used for additional compression, and SSH or stunnel can be used for data security.