Your email address will not be published. This site uses Akismet to reduce spam. Learn how your comment data is processed. The three typical tasks that require my attention are: Regular test restores a backup is only as good as your restore process and ability to execute it Resizing pool limits as backup sizes change over time Bringing additional storage arrays online when growth outstrips hardware capacity every couple of years or so. Use the catalog to tell you which volumes your data resides in.
Let the computer deal do the grunt work. Create pools based on Volume retention only for maximum storage efficiency. Subdivide only based on storage medium and location. Enable Recycling always and Auto Prune where possible Use the Scratch Pool and Recycle Pool directives to free yourself from manual rebalancing tasks Consider pre-creating your volumes, and monitoring free capacity based on the number of volumes remaining in the Scratch Pool Volumes How many and how big?
Two important behaviours to note are that: Bacula treats volumes as append-only until they are full. Once the volumes are full, the retention period begins counting down, and space is only ever reclaimed by recycling an entire volume once the retention period has been reached. Bacula tries to hold off deleting your data for as long as possible. It will always prefer to create a new volume rather than recycle and overwrite an existing one. Demand for additional storage can happen very suddenly, but purchasing new hardware can take a while to action.
By having plenty of spare capacity up front, this means you can double in size without having to spend any time, effort or money on the problem. This is typically by adding another batch of hard drives to the storage daemon. Now I just sit and wait, and see how much that affects my backups.
Over time, I should have to do this less and less often. I should also adjust my copy query to ignore backups that are more than 21 days old. Great article. For now, just the SQL is available. Ahh, good. It exists everywhere, even if it is bash one some systems. You must be logged in to post a comment. Prune the old Volumes My Incremental pool has a retention period of 21 days. Marking it purged. The bconsole command affects the Catalog database. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 1. Hot Network Questions. The alternative to Automatic Pruning is Manual Pruning, in which you explicitly tell Bacula to erase the catalog entries for a volume.
Or, if the catalog is starting to get too big, you could prune the oldest jobs to save space. Manual pruning is done with the prune command in the Bacula Enterprise Console manual thanks to Bryce Denney for the above explanation. Having the File records in the database means that you can examine all the files backed up for a particular Job. When the File records are pruned, the Job records can remain, and you can still examine what Jobs ran, but not the details of the Files backed up. In addition, without the File records, you cannot use the Console restore command to restore specific files.
When a Job record is pruned, the Volume Media record for that Job can still remain in the database, and if you do a list volumes , you will see the volume information, but the Job records and its File records will no longer be available.
In each case, pruning removes information about where older files are, but it also prevents the catalog from growing to be too large. You choose the retention periods in function of how many files you are backing up and the time periods you want to keep those records online, and the size of the database. Volume pruning means removing Jobs and Files records from the catalog.
It does not shrink the size of the Volume or affect the Volume data until the Volume gets overwritten. This means that all Jobs that are older than the VolumeRetention period will be pruned from every Volume that has Volume Status Full or Used and has Recycle set to yes.
Pruning consists of deleting the corresponding Job, File, and JobMedia records from the catalog database. No change to the physical data on the Volume occurs during the pruning process. When all files are pruned from a Volume i. The Pool records that control the pruning are described below. At that point, Bacula will prune all Volumes that can be pruned i. AutoPrune set in an attempt to find a usable volume.
If during the autoprune, all files are pruned from the Volume, it will be marked with VolStatus Purged. The default is yes. Note, that although the File and Job records may be pruned from the catalog, a Volume will be marked Purged and hence ready for recycling if the Volume status is Append, Full, Used, or Error. Note, when all the Job records that are on the Volume have been removed, the Volume will be marked Purged i. When this time period expires, and if AutoPrune is set to yes , and a new Volume is needed, but no appendable Volume is available, Bacula will prune remove Job records that are older than the specified Volume Retention period even if the Job or File retention has not been reached.
Normally this should not happen since the Volume Retention period should always be set greater than the Job Retention period, which should be greater than the File Retention period.
The Volume Retention period takes precedence over any Job Retention period you have specified in the Client resource. It should also be noted, that the Volume Retention period is obtained by reading the Catalog Database Media record rather than the Pool resource record.
This means that if you change the VolumeRetention in the Pool resource record in bacula-dir. Doing so will insure that any new Volumes will be created with the changed Volume Retention period. Any existing Volumes will have their own copy of the Volume Retention period that can only be changed on a Volume by Volume basis using the update volume command. When all Job catalog entries are removed from the volume, its VolStatus is set to Purged.
The files remain physically on the Volume until the volume is overwritten. Retention periods are specified in seconds, minutes, hours, days, weeks, months, quarters, or years on the record.
See the Configuration chapter of this manual for additional details of time specification. When a Job needs a Volume and no appendable, recycled or purged is available, Bacula starts the recycling algorithm pruning Jobs and Files for the oldest Volume in the pool used by the job.
As mentioned above, there are two key points for getting a Volume to be recycled. First, the Volume must no longer be marked Append there are a number of directives to automatically make this change , and second since the last write on the Volume, one or more of the Retention periods must have expired so that there are no more catalog backup job records that reference that Volume. Once both those conditions are satisfied, the volume can be marked Purged and hence recycled.
The full algorithm that Bacula uses when it needs a new Volume is:. The algorithm described below assumes that AutoPrune is enabled, that Recycling is turned on, and that you have defined appropriate Retention periods, or used the defaults for all these items. If the request is for an Autochanger device, look only for Volumes in the Autochanger i. If two have the same date then the one with the lowest MediaId is chosen. Note, when all the File and Job records are pruned from a Volume, the Volume will be marked Purged and this may be prior to the expiration of the Volume retention period.
This record ensures that all retention periods are properly respected. We strongly recommend against the use of PurgeOldestVolume as it can quite easily lead to loss of current backup data. Search for a Volume in the Scratch Pool the default Scratch pool or another Scratch Pool defined for the pool and if found move it to the current Pool for the Job and use it. Note, when the Scratch Volume is moved into the current Pool, the basic Pool defaults are applied as if it is a newly labeled Volume equivalent to an update volume from pool command.
If we were looking for Volumes in the Autochanger, go back to step 2 above, but this time, look for any Volume whether or not it is in the Autochanger. Attempt to create a new Volume if automatic labeling is enabled and the maximum number of Volumes is not reached.
0コメント