Home ›
Do not overwrite files when copying from one server to anotherDo not overwrite files when copying from one server to another
Submitted by Benjamin Melançon on April 25, 2010 - 3:54pm
If you are searching for a way to not overwrite files when copying files or directories recursively with scp, what you probably really want is rsync.
It will avoid copying files it does not need to copy, preserving existing files of the same name and path.
For example:
ben@ubuntu:~/code/data/drupal/sites/default/files$ rsync -av data.agaric.com:/sites/agaricdesign/www/sites/default/files/ .
receiving incremental file list
./
.htaccess
07-07 taking it all over.txt
...
Searched words:
scp do not overwrite
don't override
preserve, do not replace files
rsynch
Comments
Post new comment