Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

poojanwagh

Re: How does WinSCP handle over-writing a hard-linked file?

Excellent! That's what I was looking for (and even better, in fact).
martin

Re: How does WinSCP handle over-writing a hard-linked file?

poojanwagh wrote:

Does WinSCP delete (de-link in the case of hard-links) files before uploading? If not, can this be made an option?

It does that optionally. See documentation. Well in fact it optionally uploads file into temporary file. Once the upload finishes, it deletes the original file and renames the temporary one to its name.
poojanwagh

How does WinSCP handle over-writing a hard-linked file?

Does WinSCP delete (de-link in the case of hard-links) files before uploading? If not, can this be made an option?

I am trying to do remote self-contained incremental backups using WinSCP.

Several places (<invalid hyperlink removed by admin>) advocate the use of rsync & the UNIX
cp -al
to make compact incremental backups.

However, in order to do so, new backups must make sure they do not over-write hard-linked files. For example, if I:
1. upload a file b.txt to the directory remote:latest/b.txt (using WinSCP in SFTP mode)
2. do a
cp -al latest old
(on the remote host)
3. Screw up the b.txt file locally
4. Upload the (corrupted) b.txt file to the directory remote:latest/b.txt again (using WinsCP in SFTP mode)
Then: What is WinSCP's behavior? It can either over-write the file directly (therefore over-writing both latest/b.txt and old/b.txt which references/hard-links-to it). Or, it can de-link (delete) latest/b.txt before uploading.

The reason I ask is that rsync does de-link the file before writing the new version. That's the behavior that I want with (the much-better-than-rsync) WinSCP.

I've spent about 15 minutes looking through the manual. So, I admit that there might be an option there that I missed. My apologies if this is the case. However, I did make an effort. :D[/b]

P.S. Excellent software. I recently battled with rsync for the last couple of days. Finding WinSCP has already saved me a bunch of heartache.