On 2012-12-05 20:17, Jonathan Horne wrote: > What process keeps the bacula database size under control? Mine is > growing and growing, and I'm not sure how much space i need to > allocate for future growth.
First, some questions: What version of Bacula are you using? What version of PostgreSQL are you using? How large is your database? I'm expecting output like this: bacula=# select pg_size_pretty(pg_database_size('bacula')); pg_size_pretty ---------------- 22 GB (1 row) bacula=# Next, some background, which you many already know, but is highly relevant to the topic. The database is used to store the Catalog, which is a list of what was backed up, from what client, when, and where is it stored. The Catalog is one of the strongest features of Bacula. Personally, it is what drew me to Bacula. Retention refers to how long data remains in the Catalog. It is *not*, as commonly misunderstood, how long your backups are retained[1]. There are three retention values that can be specified: * File Retention * Job Retention * Volume Retention Once *any one* of these retention periods has expired, the Volume is eligible for recycling[3]. Once a Volume is recycled, the data that *was* on that Volume is lost forever. NOTE: just because a Volume is eligible for recycling does not mean that it WILL be recycled. Bacula must first need a Volume to write to and be unable (according to configuration restrictions) to create a new Volume or append to an existing Volume). Bacula recycles a Volume as a last measure. It is important to note[2] that Catalog information is the basis for restoring data. Restores can be done without the Catalog, but I sure wouldn't want to do that. I set File retention very high. 3 years. I set Job retention very high. 3 years. I then let Volume retention dictate how long a given backup is kept. I keep incrementals for three weeks. I differentials for 3 months. I keep Fulls for 3 years. About database size: Disk space is cheap. I have TB of data on disk and tape. My database is 22G. That's a big database by some standards, but it's not a hefty database when PostgreSQL id used. I consider that ease of restore is the primary consideration. When it comes time to restore data, I want to do it right now. I don't want to deal with bextract, bls, etc (the tools that you would use if you had no Catalog). That is why I keep my retention values so high. That is why I keep File retention = Job Retention. My recommendation: unless you're running into problems with the database size, let it grow. [1] - some may wish to argue it is the same, but it isn't. [2] - as I wrote a while ago: http://dan.langille.org/2010/02/08/bacula-retention-periods/ [3] - There is more to recycling than this. Pruning, purging, etc. See http://www.bacula.org/5.0.x-manuals/en/main/main/Automatic_Volume_Recycling.html -- Dan Langille - http://langille.org/ ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users