bacula attacks
November 7th, 2005
I've come into a Seagate Scorpion96 DDS-3 autoloader, which would probably work just fine under windows using backupexec. Thats the kicker though, as I've removed all windows servers from my apartment in a consolidation effort After a little research I found bacula, which seems to cover all of my needs (and gentoo has an ebuild for). As this was my first time with a tape library/changer, I was initially oblivious to the lun probing requirement. The library itself is addressed with a single scsi id, but is actually made up of different components. In the case of the seagate we have the tape drive itself at lun 1 and the changing mechanism at lun
SCSI Media Changer driver v0.25
ch0: type #1 (mt): 0x0+1 [medium transport]
ch0: type #2 (st): 0x2+4 [storage]
ch0: type #3 (ie): 0x0+0 [import/export]I've noticed that the changer driver attempts to INITIALIZE ELEMENT STATUS it will eventually timeout (3600 seconds later), which doesn't really work for me, so switched to using ch as a module and passing "init=0".So far the bacula setup has gone well, tonight will be the first full backup. I will report my results. My only grip with bacula so far is the lack of a web ui, which I may take the time to write if bacula works well enough. On the stats side, turbo fredriksson has taken the time to write some cacti stuff for bacula.
As a note to people who attempt to implement a home backup system, mtx(1) and mt(1) are you're best friends.
<update>Apparently bacula does indeed have a web ui (bacula-web).</update>
mysql backup and restore
July 29th, 2005
Backing up and restoring a mysql (or any) database is pretty easy as there are mulitple methods. Amongst those methods is the outright copying for the datafiles for the database. The datafile method is pretty simple, but requires the database to be shutdown to work. As a note this method also works with most database systems I've run into, though some require a bit more effort. For instance mssql requires the database to be attached using sp_attach. The other method involves using database dump utilities (mysqldump, pgdump) to export the data.
Todays javascript tidbit of the day is the for/in loop, which has just recently found its way into java (though it has been in C# since its inception).