12. We needed to backup Netware servers too, so we used NCP mounting , which was very slow.
13. The Scripts echo "Here we rsync DATA volume on CASADMLX server to /bkup/casadmlx/DATA/ folder on CASARKLX server" rsync -av --link-dest= /bkup/casadmlx/DATA/current root@casadmlx:/media/nss/DATA/ /bkup/casadmlx/DATA/ $date rm /bkup/casadmlx/DATA/current ln -s /bkup/casadmlx/DATA/ $date /bkup/casadmlx/DATA/current rm -r /bkup/casadmlx/DATA/ `date --date='30 days ago' +%F`
14. The Scripts echo "Here we rsync DATA volume on CASADM server to /bkup/casadm/DATA/ folder on CASARKLX server" ncpmount -S casadm -A casadm -U .bkup.cs.users.selkirk -P provo /mnt/casadm/ rsync -av --link-dest= /bkup/casadm/DATA/current /mnt/casadm/DATA/ /bkup/casadm/DATA/ $date rm /bkup/casadm/DATA/current ln -s /bkup/casadm/DATA/ $date /bkup/casadm/DATA/current rm -r /bkup/casadm/DATA/ `date --date='30 days ago' +%F` umount /mnt/casadm/
15. The Scripts echo "Here we rsync INSTRUCTORS volume on FS1 server to /bkup/fs1/INSTRUCTORS/ folder on CASARKLX server" mount.cifs //fs1/INSTRUCTORS /mnt/fs1/ -o user=Administrator,pass=provo rsync -av -e 'ssh -p7774' --link-dest= /bkup/fs1/INSTRUCTORS/current /mnt/fs1/INSTRUCTORS/ /bkup/fs1/INSTRUCTORS/ $date rm /bkup/fs1/INSTRUCTORS/current ln -s /bkup/fs1/INSTRUCTORS/ $date /bkup/fs1/INSTRUCTORA/current rm -r /bkup/fs1/INSTRUCTORS/ `date --date='30 days ago' +%F` umount /mnt/fs1/
16.
17. We wanted to have good error checking, replication, reporting and central control.
18. We also wanted to actually understand what was going on and we wanted a system that would fit our exact needs. So we wrote our own.
19.
20. We decided to implement only the bare-minimum that we needed.
21. The result was a 100-line script that supports custom mount drivers and performs an incremental backup using rsync .
22.
23. Google Code: http://alpine-backup.googlecode.com
43. The QNAPs are NASs running some mystery meat Linux, that was the source of many headaches.
44. Initially, we added more configuration files that would copy the backups from the main backup server to the offsite one, but this grew quite complicated.
47. But, when a QNAP reads the configuration files, it would run in slave mode and pull the backups from the backup server, instead of the live server.
TTP Conference 2011 – Celebrating 25 years of supporting Novell Solutions
According to the man page, --link-dest hard links to files in the link destination when the backup is the same as the source. (ie. identical files).
We set our link dest to current, a symbolic link always pointing to the current backup, then preform the backup. Next we set our current link to the latest backup and delete backups older than 30 days.
This is how we backed up a Netware server using NCP.
..and a Windows one, using CIFS.
This is a screenshot of alpine-backup's code. As you can see, it is quite similar to our bash scripts, but adds error checking and is written in PHP. If you want to have a look at alpine-backup, the URLs are on the bottom.
This what our backup directory looks like. As you can see, only the first backup is large, the rest are quite small, only about 200MB large.
This an example of the configuration file format alpine-backup uses. It is an INI file. (I used this format because PHP had a built-in parser for it.)
This what our mount drivers look like. This particular one actually stops and restarts services for backup. (We use it for iPrint backups.)
Here is a screenshot of the mail we get from cron. As you can see from the summary, the backups are all successful!
This is a diagram of Selkirk College's organizational structure. All our servers are backed up in at least two locations. As you can see, there are two islands: the Nelson-centric one and the Castlegar-centric one. This is due to the fact that there are no fibre links between Castlegar and Nelson.
...about half. (we sometimes use different parameters for our main and offsite backups.)
At this point I'd like to show you our first demo: How no-change syncing works. QNAP doing a Live Backup
QNAP in Slave Mode
Well, this does not explain much, let's have a look at snapup.sh
The first two commands SSH into our GroupWise server and use the perl scripts to create and activate a snapshot. Then we mount the snapshot and perform the backup via SSH.
Now, I'm going to move on to our next demo. Live Post Office
We start up the POA using an a backup.
..and now: some old mail.
alp-dbrestore does not like dashes in DB Names.
Next, I'm going to show you how we restore our MySQL backups. First, we create test article.
Then, we create a new DB with an old version of the site. (Avoid dashes in database name)
We switch Drupal to the restore DB.
The article has now been rolled back.
This is a screenshot of our Oracle backups in action. Since we're running early, I'm going to show you what alpine-backup's code is like.
Any Questions? TTP Conference 2011 – Celebrating 25 years of supporting Novell Solutions