Friday, March 14, 2008

Publish NTBackup log to Internal Web server

Creating a web based backup log for your NTBackup

NTBackup is a backup tools from microsoft, it's usually already installed on your windows
machine. After the backup finish NTBackup create a backupog, but the sucks thing is, that
we can not change the directory where NTBackup log reside. The backup log locate at
"C:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"


At my office we use NTBackup to perform the system state backup, and the backup result need to be checked every morning.
Because the NTBackup run with administrator priveledges, So i need to create a way so other people can review the backup
file without login to that server. And the answer is to publish the backuplog to our internal web server.

To do that I use rsync to syncronize the backup log our Linux based web server. But there's a problem with the logfile,
after it was syncronized using rsync, the problem related with character encoding. If we open that backup log on firefox It will show funny characters (see image bellow)


To handle this problem I use python script to change the encoding.
This script also will run the rsync command and generate HTML file.
I will post this python script on my next blog.

To Configure rsync on windows see Brent Noris Homepage about installing rsync on windows
Here the part of my rsync configuration to point to the NTBackup Log directory
[backuplog]
path = C:/Documents and Settings/Administrator/Local Settings/Application Data/Microsoft/Windows NT/NTBackup/data
read only = yes

After you finish configure the rsync on your windows machine, edit your crontab, then add the python script to your crontab entry.

No comments: