Robert's blog
Robert Važan

Backup linux server to Windows client

Short guide to old-fashioned offline backup of linux server to Windows client.

This is another one that should be quick and easy. It's not. I've tried a lot of backup and syncing software. Most of it simply doesn't work or it doesn't even have that feature. I ended up with something that works even though it's not perfect.

The winner is WinSCP. It will connect via SFTP without having to setup standalone FTP server. It has scripting interface and a really neat .NET wrapper around that scripting interface. I plugged it right into my .NET-based automation utility that I use extensively for all the boring tasks.

I am using the SynchronizeDirectories method in the API, which allows one-way (in either direction) or two-way synchronization. Something similar exists in both the GUI and the scripting interface, of course.

Duplicati is a nice backup software that I use a lot, but it can only upload to FTP. It cannot download files from FTP servers.

I've looked at GoodSync, which appeared to be free with some optional paid toppings. Big mistake. Free edition is limited to syncing 100 files. Its author obviously wanted me to suffer a lot after sneaking supposedly free version into my hands to make use of my limited time for free marketing of his product.

Another thing recommended a lot is rsync. I have tried both MinGW and Cygwin versions of rsync and they both threw cryptic errors at me. No logs recorded on the server. Executing the relevant ssh command by hand worked. Apparently rsync couldn't communicate with its own copy at the other end of the connection.

There's a Windows port of rsync with nice GUI, but it's not clear whether it is compatible with the linux one. In any case, I didn't see any tutorial on how to setup it against linux server. And with my track record of setting up rsync ports, I didn't even attempt to make this one work.

Then there is a whole slew of "private DropBox" apps as well as fancy git/mercurial schemes. The problem with all these techniques is that they usually work in an isolated folder. SFTP already provides me with access to the whole filesystem on the server, which is really essential when making backups.

So my vote goes to WinSCP. Leave me a comment if you know about something better.