I often connect to a database by sftp protocol, and I get the data by doing get -r
is there any option to skip all existing file on my computer ? I tried get -r --overwrite but it does'nt work. (I know I could set my files in read only but I'ld like to find a better way).
3 Answers
This is sort of possible with sftp. Use 'get -a -r'. According to the man page of sftp for ubuntu: the -a option attempts to continue interrupted transfers and only overwrites a file if there are differences in the file.
No, it is not possible. Manual page for sftp does not mention any option that would make that working. You would be best with copying the files to some known-to-be-empty location and then copy to your intended localtion with
get -r remote_path/ empty_path/
!cp --no-clobber empty_path/ real_target/ 3 I would suggest using rsync over ssh:
rsync -avz -e ssh --progress user@server:/var/db ~/dbSome further reading: