简体   繁体   中英

Backup from linux to Windows Server

I have a Debian server (VPS) and a Windows server (at home). I would like to backup periodically some paths of my Debian to My Windows server. My WS act as NAS and I use it for my all backup.

Firstly I started to configure a cron task with rsync on my Debian but as there is no native ssh server on Windows server it may not be the best solution. Then I was wondering if it would not be better to use my windows server to pull data from my debian to windows.

Here is the only link I found that make things on this way: http://troy.jdmz.net/rsync/ (server pull from client)

Also my windows server is at my home and it bring one constraint which is that I can change my home location, so my ip change too and all the configuration of router. I would like to just plug the windows server and let it continue to work normally.

What do you guys think about all of that ? Is it an elegant solution to make this on this way ? Do I have to install cygwin with rsync ? Is it possible to set a periodic task on my windows server ?

Thanks in advance.

As you pointed out in your question - being that your Windows machine is behind a NAT router, it may be simpler for your windows machine to 'pull' files from your Debian VM, as opposed to your Debian VM 'pushing' files to your Windows machine. Pushing files from your Debian VM to your Windows machine would require you to setup some type of server on your Windows machine that would listen for incoming connections from your Debian VM on some designated port, it would required that you setup a port-forwarding rule on your NAT router, and it would require you to setup a dynamic DNS hostname that would change whenever your router's public IP changes. And, since you would be opening a port up to the public, it would also require you to take into account security considerations to make sure that nothing gets compromised.

So, pulling files to your Windows machine from your Debian VM would be simpler. One way to do this would be to install Cygwin and use rsync, as you mentioned. Another solution may be to install putty on the windows machine, then use pscp on the windows machine to copy files from the remote debian host to the windows machine. The pscp command can be scripted using a DOS batch script, Powershell, or any number of other windows scripting tools. See http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM