On Wednesday 25 October 2006 23:00, Christoph Haas wrote: > On Wednesday 25 October 2006 22:52, Martin Simmons wrote: > > >>>>> On Wed, 25 Oct 2006 20:04:27 +0200, Christoph Haas said: > > > > > > On Wednesday 25 October 2006 15:15, Wolfgang Powisch (privat) wrote: > > > > My Setup: > > > > bacula-1.38.8 > > > > Catalog on PostgreSQL 8.0 Server > > > > File Storage > > > > > > > > I'm seeing my Catalog Database getting larger and larger. > > > > the "file" table has >45 million records now and uses over > > > > 10GB on disk. > > > > > > > > Doing a "list jobtotals" shows only about 5 million files total. > > > > (this looks much more realistic than 45millions) > > > > > > > > It seems, that for some reason, file entries (and maybe others too) > > > > are not pruned from the catalog. Calling "prune files client=xxx" > > > > gives a "No files to prune". > > > > > > > > As I've seen in the database, there are records for Clients, which > > > > are no more in the configuration of bacula-dir. > > > > > > > > Is it possible, either from bconsole or with some great SQL query, > > > > to make some sort of database cleanup and delete such unused entries > > > > from catalog ? > > > > > > Use the "dbcheck" utility to wipe off orphaned entries. Example on > > > Debian for a possible crontab entry: > > > > > > 3 4 * * * /usr/sbin/dbcheck -b -f -c /etc/bacula/bacula-dir.conf > > > > > > By the way... the documentation reads that orphaned entries are > > > removed automatically. That's not true with at least 1.38.9 here. > > > 'dbcheck' finds orphaned entries every night. Who's fault is that? > > > > Orphaned records are never removed automatically. > > Let me quote > http://bacula.org/rel-manual/Volume_Utility_Tools.html#SECTION0003612000000000000000 > > "Normally dbcheck should never need to be run, but if Bacula has crashed or > you have a lot of Clients, Pools, or Jobs that you have removed, it could > be useful." > > Actually I haven't changed my config in months. And after each full backup > I can run dbcheck and it will remove a few ten thousand File entries. So I > suspected that some part of Bacula misses to remove old database rows. And > it didn't crash either. The storage daemon dies from time to time though. > But that should keep altering the database directly anyway. > > > What kind of records is this wiping every night? > > All orphaned ones. Whatever that means exactly. > > > In general there > > shouldn't be any orphaned file records because pruning should remove the > > file records before removing any job records. > > I hoped so, too, but the otherwise endlessly growing size of my database is > telling me differently.
If your database is continuously growing, there is some problem. On the two separate systems that I run, the database size (MySQL and SQLite) has remained constant for years. Reasons a database may grow: - the database will continue to grow until the longest retention period is reached, then after a short time, it should stabilize and not grow any more. - failed jobs - incorrectly configured retention periods (or very long ones) - lots of "temporary" filenames on your system (created for short period, backed up, then deleted). ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users