Why is scp not overwriting my destination file?
Posted
by Noli
on Server Fault
See other posts from Server Fault
or by Noli
Published on 2010-06-14T04:02:02Z
Indexed on
2010/06/14
6:13 UTC
Read the original article
Hit count: 328
I'm trying to back up a file via the command
scp /tmp/backup.tar.gz hostname:/home/user/backup.tar.gz
When I run it, the scp progress bar shows up and it looks like its transferring the file, however when I log into the destination server to check the file, the timestamp and filesize haven't changed from the older version, so it looks like scp didn't overwrite the old file at all. It only sees to work when I manually delete the file from the destination server.
I'm running ubuntu, and this is happening on two servers: one cygwin ssh, and one fedora core 3.
Anyone have any idea why this is happening? I thought scp would ONLY overwrite existing files..
Thanks
© Server Fault or respective owner