On Thu, Oct 27, 2005 at 09:49:11AM -0700, Drew Tomlinson wrote: > On 10/27/2005 8:47 AM Drew Tomlinson wrote: > > A little more poking around and I find that basically nothing works in > bconsole so I suspect my database is extremely corrupted. So now I'm > off to Google in search of the recommended method to wipe out the > current corrupted database and restore from my nightly catalog backups. > However if someone could nudge me in the proper direction, I'd really > appreciate it.
You don't say which database you're using, which affects the specifics of the restore process somewhat! I think there's a dbcheck program which is part of bacula, which will check your database for consistency, although someone did mention that with a large catalog it can eat an extraordinary amount of RAM (kinda like xfs_repair does on a large XFS filesystem, I guess). I think the procedure would be something along the lines of: * Torch your existing database (or rename it) * Run make_bacula_$dbname_tables (or whatever the script is called) to create a fresh, blank, database. You could create it under a different name to the corrupt one if you can't rename an existing database... * Make sure your director configuration is the same as before (not sure if this is necessary, but it can't hurt), with only the name of the database changed if necessary * Use bscan to repopulate the database so that it holds information about the tape containing your latest catalog backup. * Restore the catalog backup (probably a single text file containing SQL statements to repopulate the database) * Import the database dump, checking to see what it's going to import into, and that it isn't going to clobber anything important * Hope that the catalog backup you restored wasn't corrupted. You may be able to use bextract instead of bscan+restore to extract just the database dump, which would probably save you considerable time and fustration. -- Russell Howe | Why be just another cog in the machine, [EMAIL PROTECTED] | when you can be the spanner in the works? ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users