Remote Backup of Windows Boxes w/o Samba?
reezle asks: "I'm looking for a good (free as in beer) method to have my Debian server back up some remote Windows machines. There is no Samba in the mix; this is supposed to be a strictly secure internet thing. I've been toying with OpenSSH on the windows computers as a good tunnel, thought of simple tools like ntbackup initiated from a script on the Linux box, but not all of the pieces have come together yet. I need to have the Linux box make the connection, back up data (full and incremental backups) and have that backup data get back to the Linux machine in an encrypted format (across the wild internet). Has anyone done something like this?"
Install an SSH Server on the windows machine, use SHFS to mount the remote filesystem to a directory, then use rsync to copy it.
Your best bet, in a cheap and dirty solution, is to use SCP. Set up a cron job to securely copy the files you need. No muss, no fuss, no samba, and all encrypted.
Use the windows backup program to have windows make the backups then have Windows copy them to the debian box via scp.
Or.... put Samba on the Debian box, use port forwarding and the loopback adapter to create a tunnel to the samba box and have the windows backup program write to the samba share which is only listens on 127.0.1.1
setup on windows box:
Loopback IP: 172.168.254.1
Real IP: XX.XX.XX.XX
SSH port forward from Local 172.168.254.1:139 to remote 127.0.0.1:139
Create an account for each machine on the debian box.
Windows backs up to \\172.168.254.1\MACHINENAME
I've had fairly good experiences with the Unison product. It works similarly to rsync but with a few enhanced features. And I quote...
Anyway, you might give it a look...
As mentioned earlier here, there are numerous SSH/SCP implementations for Win32. Search around. They're somewhat hard to find, but there's quite a few (make sure you choose one in active development. There are quite a few abandoned projects with security holes and other bugs). Honestly, I don't remember what one I use on my windows machine :) As a word of advice, do not use a cygwin distribution. They're somewhat buggy and need to run inside cygwin. The 'native' servers which link against some cygwin libraries seem to be allright though.
There's also another easier option. But, it will cost you. Use a "real" backup program such as Retrospect which will do compression and encryption (very strong encryption if you desire) client side. More often then not, this is what big businesses use. You can then safely use smb, ftp, scp, whatever you wish
-- If you try to fail and succeed, which have you done? - Uli's moose
Use netcat (nc)
A version exists for Windows (it's what the kiddee's use), but it can be used for legit purposes if done properly.
Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
Although the clients do not have built in support for encryption, according to the manual you can run the clients through stunnel to encrypt the traffic between the clients and the backup server. Future versions are supposed to support encryption built into the client.
It is highly configurable and easy to set up automatic backup routines and you can monitor operations
using a webbased interface. BackupPC also supports various transfer methods such as rsync, samba, etc.
and makes use of compression and pooling of files to save diskspace.
Of course, getting some scripts using rsync over ssh or something like that won't be that hard,
but anyway, I recommend you to check out BackupPC.