[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.
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
------------------------------------------------------------------------------
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