Bacula-users

Re: [Bacula-users] Database Size

2017-03-16 10:18:59
Subject: Re: [Bacula-users] Database Size
From: James Chamberlain <jamesc AT exa DOT com>
To: Mikhail Krasnobaev <milo1 AT ya DOT ru>
Date: Thu, 16 Mar 2017 10:17:56 -0400
On Mar 16, 2017, at 3:29 AM, Mikhail Krasnobaev <milo1 AT ya DOT ru> wrote:
 
15.03.2017, 19:57, "James Chamberlain" <jamesc AT exa DOT com>:

Hi all,

I’m getting a touch concerned about the size of my Bacula database, and was wondering what I can do to prune it, compress it, or otherwise keep it at a manageable size. The database itself currently stands at 324 GB, and is using 90% of the file system it’s on. I’m running Bacula 7.4.0 on CentOS 6.8, with PostgreSQL 8.4.20 as the database. My file and job retention times are set to 180 days, and my volume retention time is set to 365 days. Is there any other information I can share which would help you help me track this down?

Thanks,

James

Good day,

do you run any maintenance jobs on the database?

Like:
--------------
[root@1c83centos ~]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
 
# dump all databases once every 24 hours
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /home/pgbackup/postgres_all.sql.gz
 
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night)
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze"
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet"
 
# re-index all databases once a week
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"'
-----------------
vacuumdb is a utility for cleaning a PostgreSQL database. vacuumdb will also generate internal statistics used by the PostgreSQL query optimizer.

I don’t believe I’ve been doing any of this.  I’ll read up on the documentation and see about putting these into place.

Thanks!

James
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>