Welcome! » Log In » Create A New Profile

List Volumes without Job ?

Posted by dave. 
List Volumes without Job ?
August 03, 2016 07:00AM
Hi There,

I am switching from bacula tape to disk based backup. I'm as good as finished and testing the system now.

In this phase i recognized that it would be helpful if I could purge and truncate volumes with no jobs on it.

So far I was not able to find a way to list volumes with 0 jobs on it and then purge and truncate them with some script. I tried "select VolumeName,VolJobs from Media;" but even after I have purged the jobs from a client it still shows the same amount of jobs. if it would show 0 Jobs that would be easy to script .... . or do I mix s'thing up ?

I think it is a bit cumbersome to purge and truncate volumes. maybe there is an easy way out there ?

Thanks for helping me out.
--> David
List Volumes without Job ?
August 03, 2016 07:49AM
Hello David,

You can use the "prune" command for this purpose. Bacula will only prune volumes with no jobs (and files consequently) associated to it.

I would recommend you to use the prune command instead of the purge command since the former respects the retention periods and the latter do not.

You can have an admin job configured to run a prune of all your volumes and then the truncate. This admin job should be run while no other job is running (whenever this can be possible).

This should work fine :-)

Best regards,
Ana

On Wed, Aug 3, 2016 at 4:01 PM, dave <bacula-forum < at > backupcentral.com ([email]bacula-forum < at > backupcentral.com[/email])> wrote:
[quote]Hi There,

I am switching from bacula tape to disk based backup. I&#39;m as good as finished and testing the system now.

In this phase i recognized that it would be helpful if I could purge and truncate volumes with no jobs on it.

So far I was not able to find a way to list volumes with 0 jobs on it and then purge and truncate them with some script. I tried "select VolumeName,VolJobs from Media;" but even after I have purged the jobs from a client it still shows the same amount of jobs. if it would show 0 Jobs that would be easy to script .... . or do I mix s&#39;thing up ?

I think it is a bit cumbersome to purge and truncate volumes. maybe there is an easy way out there ?

Thanks for helping me out.
--> David

+----------------------------------------------------------------------
|This was sent by dwa < at > espros.ch ([email]dwa < at > espros.ch[/email]) via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com ([email]abuse < at > backupcentral.com[/email]).
+----------------------------------------------------------------------

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net ([email]Bacula-users < at > lists.sourceforge.net[/email])
[url=https://lists.sourceforge.net/lists/listinfo/bacula-users]https://lists.sourceforge.net/lists/listinfo/bacula-users[/url]
[/quote]
List Volumes without Job ?
August 09, 2016 06:15AM
Dear Ana,

thanks for your reply.

I deleted all the "large volume" job entries in the Catalog and tested with.

"list jobs" and "list jobmedia". so far so good ! then I ran "prune expired volume yes"

well it did mark about 5 volumes as "Purged". But there are 50 others that should be marked as purged as well. And it did not. And I do not get it.

so - I guess there must still be some entries in the Catalog but it seems I cannot find it ...

What am I missing here ?

I know ...
Volume Retention = time-period-specification
Note, when all the File records have been removed that are on the Volume, the Volume will marked Purged (i.e. it has no more valid Files stored on it), and the Volume may be recycled even if the Volume Retention period has not expired.

thanks
--> David
List Volumes without Job ?
August 09, 2016 11:25PM
Hello Dave,

The prune command will not prune volumes that hadn&#39;t its volume retention period expired (this means LastWritten+VolRetention < current datetime when the prune command is issued).

Therefore, If Bacula needs to a volume but there is no available volume (status=append) or it cannot create a new one in the pool or it cannot pick up one from the/a Scratch pool, *and* the "Autoprune = yes" ans "Recycle = yes" are configured for the pool resource, then a volume that has no more jobs/files associated to it can be eligible for recycling (this means that bacula will reuse the volume. The status=purged is temporary in this case only for the algorithm purposes). In this case, you can have the "Action on Purge = Truncate" configured in your pool definition, so bacula will truncate the volume before reusing it.

If you want to manually prune volumes that has no more jobs/files associated to it, I would recommend you to configure your Volume retention <= Job retention <= File retention. This way, you will be able to manually prune the volumes when jobs/files are pruned.

It is strongly recommended to use a manual/scheduled script for the prune task (an Admin Job can be used to regularly run this script). Also that this could be done when no jobs are running (you can do this in a by pool basis when the pool  is not being used by any job).

If you want to use the prune command for the existing 50 volumes, make sure to prune the jobs (consequently the files will be pruned) before and that the retention period for these volumes had expired. If this is not the case, you can change the Volume retention value in the configuration file and update this new value to all the exiting volumes using the update command from bconsole. Then you will be able to manually prune them.

Hope this helps.

Best regards,
Ana

On Tue, Aug 9, 2016 at 3:15 PM, dave <bacula-forum < at > backupcentral.com ([email]bacula-forum < at > backupcentral.com[/email])> wrote:
[quote]Dear Ana,

thanks for your reply.

I deleted all the "large volume" job entries in the Catalog and tested with.

"list jobs" and "list jobmedia". so far so good !  then I ran "prune expired volume yes"

well it did mark about 5 volumes as "Purged". But there are 50 others that should be marked as purged as well. And it did not. And I do not get it.

so - I guess there must still be some entries in the Catalog but it seems I cannot find it ...

What am I missing here ?

I know ...
Volume Retention = time-period-specification
Note, when all the File records have been removed that are on the Volume, the Volume will marked Purged (i.e. it has no more valid Files stored on it), and the Volume may be recycled even if the Volume Retention period has not expired.

thanks
--> David

+----------------------------------------------------------------------
|This was sent by dwa < at > espros.com ([email]dwa < at > espros.com[/email]) via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com ([email]abuse < at > backupcentral.com[/email]).
+----------------------------------------------------------------------

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. [url=http://sdm.link/zohodev2dev]http://sdm.link/zohodev2dev[/url]
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net ([email]Bacula-users < at > lists.sourceforge.net[/email])
[url=https://lists.sourceforge.net/lists/listinfo/bacula-users]https://lists.sourceforge.net/lists/listinfo/bacula-users[/url]

[/quote]
Sorry, only registered users may post in this forum.

Click here to login