Backing up Windows and Linux Machines
- Install Cygwin on a Windows 2003 Domain Controller (http://www.gaztronics.net/rsync.php) or use windows backup (http://www.ilopia.com/Articles/WindowsServer2003/Backup.aspx)
- Setup rsyncd on a Linux box with Samba running
- Utilize an external hard drive on the Linux box and a network storage device for storing backups.
- The win2k3 machine uses rsync or backup via Samba to copy its docs to the external hard drive on the linux box
- The Windows client machines run a batch file when they log in that copys their files to a backup share (the external hard drive) in Samba on the Linux box.
- The Linux box uses rsync locally to back itself up to the external hard drive.
- Lastly, the Linux machine uses rsync locally to copy from the external hard drive to the network storage device mounted locally as a file system.
- Ideally everything to get all of the machines up and running after a total failure.
- All documents from the network storage device, documents from users machines, and documents from shares on the win3k server
- All settings and conf files needed to restore the machines to current working order after a full system reinstall
Configuring the Linux backup server
The Linux backup server will handle the backups of the entire network. All other machines will back up their files to this one, and it will take care of ensuring that there are multiple copies of their files. This server will also be responsible for backing up itself as well as a network attached storage (NAS) device.
Choose storage locations
This server will have a local filesystem dedicated to receiving backups from other machines, and will pass these backups on to the NAS as well as an external hard drive. The contents of the NAS will also be copied to the external hard drive.
Choose type of backup
This backups run on this machine will be complete backups. No incremental backups will be used because the majority of the files being backed up will be system images, and a snapshot of the files on the file server as well as an image of this machine.
Choose frequency of backup
The documents on the file server will be backed up every night, all other backup operations will be once a week. Depending on need, backups may be done more often in the future using more storage devices. 7 days of daily backups will be stored on the backup server, and 3 weeks of weekly backups will be maintained on the NAS.
Set up the file system and backup scripts
Several mount points will need to be created to work with all of the backup tasks
- /mnt/backups/ - folder for all backup related mount points
- /mnt/backups/clients/ - mountpoint for clients to write to, contains a folder for the hostname of each machine
- /mnt/backups/nas/ - root share on the NAS device, used to copy those documents locally, as well as to copy backups of other machines to it.
- /mnt/backups/external/ - external hard drive (if more are used later, there will be shares "external1", "external2", etc)
In addition to the mount points, several scripts are needed that will be run at the intervals mentioned above. All backups will have their format as: YYYYMMDDHH_[daily|weekly]_systemname
- backup_machine.sh - backs up this server machine to /mnt/backups/clients/backupserver/ once a week, deletes backups that are over 3 weeks old.
- nightly_backup.sh - backs up the documents on the NAS (except the backup folder) to /mnt/backups/clients/nas/ once every night. deletes any backups that are older than 7 days. Also copies all backups to /mnt/backups/external/
- weekly_backup.sh - backs up everything in /mnt/backups/clients/ to /mnt/backups/nas/ once a week, deleting backups that are over 3 weeks old.
Install and configure Samba to talk to Windows machines
the /mnt/backups/clients/ folder will be shared for Windows machines to write to when they perform a backup.
Install and configure Rsync to talk to Linux machines
the /mnt/backups/clients/ folder will be shared for Linux machines to write to when they perform a backup.