2

In our existing backup, we clone a backup to two different tapes by doing backup to a disk pool then copy and migrate the jobs to two different tape pools. However, after migration, the jobs which had been migrated are still occupying the disk volumes with job type changed to 'M'.

I know that we could use the Purge Migration Job directive in the migration job definition to purge that. However, that would result in both jobs on tape being selected during restore.

How do you handle this? Free up the disk space occupied by the migrated job while making Bacula not selecting both jobs during restore?

2

It's hard to know the exact problem without seeing your configuration, since there are so many parameters available to set. However, I suspect your immediate problem is simply that Bacula won't reuse the space until it must, even if the retention periods expire. The trick is to inform it how to know when it "must".

Remember, disk storage is implemented using virtual tapes, so Bacula's view of when it "needs more space" is when it runs out of "tapes". If your virtual tapes run your filesystem out of space, Bacula won't know. You must constrain the size of the disk pool using settings like Maximum Volume Bytes and Maximum Volumes.

There is also a setting called Action On Purge = Truncate, which will make Bacula truncate virtual (disk) tapes when they are purged. This is helpful, even if you've carefully constrained the disk usage, because it may help prevent fragmentation in the underlying filesystem. Usually you need to leave 20% of your disk space unused to avoid huge performance problems, because most filesystems don't allocate huge files efficiently.

One thing must be corrected though. You are probably not actually getting two copies of your data. A migration is a "move" operation, not a "copy". If you want to make two copies of a job, you must use Type = Copy. With copies, when the original job is pruned, one of the copies (type=C) will be promoted to the backup (type=B). If that copy is later pruned while another remains, the remaining copy will be promoted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.