[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scp overwriting precaution?

On Feb 26, 2020, Greg Marks wrote:
> When using scp to copy files from my server to my laptop (both running
> Debian 10 and both with the same directory tree), I like to back up
> the files in case I discover that I've overwritten a newer version of
> a file with an older version.  (I seem to make this mistake about once
> or twice a year.)  To this end, on my laptop I've defined the following
> "get from server" function:

Unfortunately, I don't know of a way to "intercept" a scp request in the
manner you've described (uploading to a remote host).  But it kind of
sounds like you're trying to use the wrong tool.

Perhaps you may find rsync to be more accommodating of your situation;
although admittedly I don't know if it can entirely protect you from
this either.

Only other thing off the top of my head would be git or svn or similar.

|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281

Attachment: signature.asc
Description: PGP signature

Reply to: