Back to Java Programming for Rsync
Now that I’m mostly done my work reviewing another office’s project, I can return to my work in deploying our new backup solution based on Rsync. I still have some work to do on the project review but now I’m waiting for documentation, so I have some time to work on my rsync stuff.
The new backup system will replace most tape in our organization by using disk-to-disk replication. I’ve talked about this before so see my article on Novell Cool Solutions or my previous posts about this. The backup system works like this:
A server that needs to be backed up will run a program to retrieve instructions for backing itself up from a centralized server. It will then execute those instructions to perform the backup. It will then email the results of the backup to the network administrator. Pretty simple. I’m doing this with java code as the managing code, and rsync as the replicator. The java program called ae_bu is started by cron, and uses rsync to download it’s instructions from the centralized server. It then executes the instructions line by line (which are a bunch of rsync commands) and keeps track of the success or failure of each command. Then it emails these results to the administrator. The reason that I’m using java instead of shell scripting or something like that is because on NetWare, you can’t make a script wait for an rsync command, so three rsync commands end up executing concurrently, which hogs the cpu. In addition it seemed like it would be a hassle to send email from a NetWare script so we just use javamail. It works pretty good.
Today I got the code finished on the java piece and we’re starting to deploy it for real.