Hello
I need to find a way to transfer the daily backup folder of my Debian server to a Windows server weekly. What would be the easiest and most stable way to achieve this? Would I definitely need a Samba installation on my Debian server?
|
| ||||
|
feedback
|
|
MS-Windows shared folder: You can share data between windows and linux system for such use : For example you would like to access MS-Windows share called //windowsserver/sharename by mounting to /mnt/win directory under Linux system. So execute these commands:
Next create the password file /etc/sambapasswords:
make sure that only root have access to it
Add an entry to your /etc/fstab:
Append an entry to your crontab like this, if you need to do a backup daily at 1AM:
FTP solution:
you may install a ftp server on your windows machine. filezilla server do perfectly the job.
setup a ftp folder and an account with all required privileges.
Later setup a file named ~/.netrc with this content:
make sure that only root have access to it:
Append to your backup script this lines that will transfer your backup file remotely to your ftp server:
Finally add your backup script to your crontab like what we did for first solution.
| |||
|
feedback
|
|
You can also do this with rsync. Set up a rsync server at the Linux machine, and use a rsync client at the Windows machine to get the files. With rsync, you will be able to resume interrupted transfers | |||
|
feedback
|
|
Here is my script in order to communicate with our windowser server. You need to add a share (ie Samba share) on the windows box :
| |||||
feedback
|
|
Another way will be to actually pull the needed files away from the Linux server from the Windows server, using pscp (from the putty package) | |||
feedback
|
|
You could setup freeSSHd on the Windows server and script a secure copy from the Debian server. | |||
|
feedback
|