How to Backup Files From a Windows Server to a Linux Server
Backing up your files is very important, especially when you're running a server with important data. Copying the data to a different server is a great idea, and from a Windows server to a Linux is better yet. Linux file systems, whether ext3, hfs, or another, tend to be more stable than Windows' ntfs format, and Linux servers are nearly immune to viruses.
Instructions
-
-
1
Physically connect the two servers via a network, whether it be wired or wireless. Share the folder on the Windows server that you wish to back up. One way to do this is by opening Windows Explorer, right-clicking on the folder, and choosing from the pop-up menu.
-
2
Open a shell on the Linux server and run the following command:
smbclient -L hostname
Replace "hostname" with the name of the Windows server (you can check this by right-clicking on "Computer" and choosing "Properties" in Windows Explorer). Make sure the shared folder is listed.
-
-
3
Mount the shared folder with the following command:
mount //hostname/folder /mnt/smb
Again, replace "hostname" with that of the Windows server, and "folder" with the name of the folder being shared.
-
4
Copy the files with the following command:
cp -r /mnt/smb/ /home/backup
Replace "/home/backup" with the directory of your choice.
-
5
Archive the backed-up data, to save space, with the following command:
tar -zcvf backup.tar.gz /home/backup
Feel free to change the name of the output file, and of course change "/home/backup" to wherever the backup is actually stored on your server.
-
1
References
- Photo Credit not speaking image by Aaron Kohr from Fotolia.com