>>>>> On Tue, 5 Apr 2011 14:35:07 +0100, Dermot Beirne said:
>
> >>>>>> On Tue, 5 Apr 2011 07:40:44 +0100, Dermot Beirne said:
> >>
> >> I'm sure that would be fine, but I'm having difficulty automatically
> >> determining which volumes are ok to prune. I need to compare the last
> >> written time to the current time and the volumes retention, and check the
> >> job type and status too to narrow the selection.
>
> >Why do you need to do that? The prune jobs command does most of what you
> >want, using the configured retention times etc.
> >
> >__Martin
>
> I am trying to prune Volumes, not jobs.
>
> If I use the prune command manually, I have to know what volume I want
> it to prune, and which pool it's in.
>
> To identify the volume, I need to check that it's past it retention
> time before I prune it.
>
> I currently have a volume in a pool which is several weeks past it's
> retention time.
> The mediaid is 986.
>
> After running prune, choosing Volume, and then the pool, I am
> presented with a list of volumes in that pool.
>
> When I enter the ID, it tells me the current retention time is 2 days,
> even though it was last written to back in January:
>
> Enter *MediaId or Volume name: *986
> The current Volume retention period is: 2 days
> Continue? (yes/mod/no):
>
> I have to choose Yes to get it to prune it.
>
> Is the above normal, and is there some way, given a pool, it will just
> prune any volume in that pool past the retention.
Yes, the above is normal for the prune volumes command. To remove the
prompts, try
prune volume=blahblah yes
It only works with a volume name, not an id.
Bacula's automatic recycling only kicks in when it runs out of appendable
volumes, so a volume could easily remain in the Used state for a long time
past its retention period.
You could also try
prune jobs client=...
to prune all jobs for a client based on the Job Retention period and then use
SQL to find the volumes that have no remaining jobs.
> I want that to happen on a schedule, to both clear old disk volumes
> and free space (using truncate), and also for my Tape volumes, to put
> them back in the scratch pool automatically once expired.
> Currently, when scratch tapes run low, I have to go through my Tape
> volumes, and purge the oldest manually. Even then, they only
> sometimes go to the scratch pool, other times I have to manually
> change the pool to the Scratch pool after purging.
Sorry, I don't use the Scratch pool so I don't know if/how that is supposed to
work.
> The Next Pool directive is set to Scratch in the Pool configuration
> for all my Tape pools.
Should that be the Scratch Pool directive, not Next Pool?
__Martin
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|