5

It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance, a ZODB file).

This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backups. Anyway, it doesn't matter. What I want to do is a full backup daily and keep two of them and a full backup weekly and also keep two of them. So at any given time I can get yesterday, the day before yesterday, a week ago and two weeks ago. Would you think that's a good idea?

I suppose I should make two schedules, daily and weekly. But which numbers should I have on the volumes and the pools to achieve this? Two volumes of 1.5GB? Any hints or guidance is welcome, I'm not a sysadmin and my experience with Bacula is very limited.

raven
  • 18,004
  • 16
  • 81
  • 112
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622

4 Answers4

4

Online backup of a large database file is risky business, as the file might change while you are reading it, rendering the backup inconsistent and possibly useless. I believe you should not be making backups of the ZODB file itself, but rather of diffs created daily by the repozo tool. This way, you also outsource the job of handling the inside-the-file subdivisions that you say Bacula is incapable of dealing with.

2

Depending on your infrastructure, I would recommend taking a snapshot of the volume you are backing up to "freeze" it and make the backup from there.

For some of our backups we are using LVM snapshots (http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html), to avoid locking any of our databases (we have terabytes of data to backup and a lock would have a huge impact on the service)

Then, as you said that the database is not moving too much, I would go and have a 6 days retention period, 6 volumes for Dailies and 2 volumes for weeklies. Your Dailies should hit the Incremental backup pool, and the Weeklies should be the fulls.

For example, make the Weeklies (Fulls) run on Monday and then an incremental every day (Tue-Sun). This will allow you to come back any day of the week if you realize your data is corrupted, without taking too much space or time during the backup.

EDIT: And... I should check the post dates before answering. Haha. 3 Years late.

Alb Dum
  • 1,121
  • 3
  • 11
  • 26
  • beeing late to answer on SO is actually a good thing: in the meantime practices and tools can improve, so there may be new and better ways of doing something which is then worth an answer. – mbx May 28 '15 at 08:31
2

In my experience with bacula and backup to disk, it is best to keep one volume per backup job. That way there is no dead space in the files as jobs expire. Bacula can reuse the whole volume and it cuts down on disk utilization. Use the "Set Maximum Volume Jobs = 1" directive in the pool resource.

I would set up two pools, a daily and weekly. Set the volume retention to two days in the daily and two weeks in the weekly. Schedule the daily on say, mon-sat, and the weekly on sunday.

Georg Zimmer
  • 899
  • 1
  • 7
  • 13
  • If you only have one volume, when it gets full and its time to re-use it, wouldn't it purge it and for some time you wouldn't have any backups at all? – Pablo Fernandez Nov 06 '08 at 11:35
  • 1
    no, sorry onve volume per job. so it never gets full. Every job gets a new volume. That way, when the volume is older than the retention period, it can just reuse it. If you allow multiple jobs per volume, then you end up with expired backups and wasted space within your volumes. – Georg Zimmer Nov 08 '08 at 23:48
0

For the open source bacula (bacula.org) the best idea is to use the "Set Maximum Volume Jobs = 1" directive indeed.

If you want the "inside-the-file subdivision for incremental backups", please consider the Delta Plugin from Bacula Systems - https://www.baculasystems.com/products/bacula-enterprise-plugins/delta.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Roman Marusyk Oct 27 '16 at 22:29