How to only copy files to a remote folder on another server that don’t already exist in the folder… from the command line in linux

file-copyremotesynchronization

I have two folders on two different servers.

I want to sync files between A and B, however, I only want to copy files that don't already exist in folder B because these files are huge. I don't care about updating files. I simply wants a copy of each in folder B.

How do I do this on Linux? (I suppose it'd be nice to know how to update files that have changed too)

Best Answer

rsync is able to do this.

rsync --ignore-existing <src> <dest>

You can perform also various kinds of updates. Just have a look at the man page.

Related Question