Save prior versions during synchronize

Advertisement

poojanwagh
Joined:
Posts:
4

Save prior versions during synchronize

Hi. When I synchronize to a remote server, I'd like WinSCP to save prior versions (backup copies) of files upon re-write or delete.

For example, if I start with the following files:
local (version)           remote (version)
---------------           ----------------
readme.txt (1)            readme.txt (1)

And then modify readme.txt locally:
local (version)           remote (version)
---------------           ----------------
readme.txt (2)            readme.txt (1)

Then I do a sync, I'd like two things to happen: 1) a backup copy of readme.txt is created remotely, either using a specified filename or in a separate directory; and 2) the actual sync from local to remote is performed:

Step 1:
local (version)           remote (version)
---------------           ----------------
readme.txt (2)            readme.txt (1)
                          => readme.txt.1.bak

Step 2:
local (version)           remote (version)
---------------           ----------------
readme.txt (2)            readme.txt (2)
                          readme.txt.1.bak

Reply with quote

Advertisement

poojanwagh
Joined:
Posts:
4

Re: Save prior versions during synchronize

martin wrote:

Have you tried remote recycle bin?

That's exactly what I need. I didn't see that in the docs. (I did look, but apparently not long enough.) Thanks! I take it I can use it with the synchronize feature?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,650
Location:
Prague, Czechia

Re: Save prior versions during synchronize

poojanwagh wrote:

I take it I can use it with the synchronize feature?
Correct.
_________________
Martin Prikryl

Reply with quote

Ricoman
Guest

Rename is better than recycle

The renaming scheme that was suggested is much better than the remote recycle bin in some situations.

First, remote recycle bin is only available for SFTP, but renaming files would be available for all flavors of FTP.

Second, keeping the versioned (backup) file in the same directory as the original one allows for easy comparison between all versions. (e.g. easier command to a "diff" program etc)

I feel that simple backup-file renaming is a MUST for any good FTP program, however I have only seen acceptatble implementations of it in AceFTP (which has many other problems of its own.)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,650
Location:
Prague, Czechia

Re: Rename is better than recycle

Ricoman wrote:

First, remote recycle bin is only available for SFTP, but renaming files would be available for all flavors of FTP.
Neither of these is be possible with SCP. With FTP both is possible, it is just not implemented yet. So this is not an argument.

That does not mean I'm against this. It more people ask for that...
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,650
Location:
Prague, Czechia

Re: Rename is better than recycle

This request has been added to tracker.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum