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? > You may imagine, that playing around with some SQL-Queries is a very > time- and memory- consuming task on this (45000000 row) table. I know. If I don't run dbcheck frequently I end up with a table with a few hundred MB overhead and running 'dbcheck' takes half a day - even with proper indexes. :( Christoph ------------------------------------------------------------------------- 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