Update all volume retentions on all pools.

2,947 views
Skip to first unread message

Daniel Carrasco Marín

unread,
Feb 9, 2015, 8:58:09 AM2/9/15
to bareos...@googlegroups.com
Hi first, sorry for my english.

I've changed the retention time of almost all of my pools and I wanna know if there is any command to update all volumes retention time.

I've tried some bacula commands found in forums but didn't work:
update pool from resource
update volumes from pool

I can try to create an script to do it, but maybe there is a fastest way.

Thanks!!

Philipp Storz

unread,
Feb 9, 2015, 9:31:42 AM2/9/15
to bareos...@googlegroups.com
Hello Daniel,

your english is quite good, so you don't have to apoligize for it. :)

Regarding your question, please use

* update -> Volume parameters -> All Volumes from all Pools

*update
Update choice:
1: Volume parameters
2: Pool from resource
3: Slots from autochanger
4: Long term statistics
Choose catalog item to update (1-4): 1
Parameters to modify:
1: Volume Status
2: Volume Retention Period
3: Volume Use Duration
4: Maximum Volume Jobs
5: Maximum Volume Files
6: Maximum Volume Bytes
7: Recycle Flag
8: Slot
9: InChanger Flag
10: Volume Files
11: Pool
12: Volume from Pool
13: All Volumes from Pool
14: All Volumes from all Pools
15: Enabled
16: RecyclePool
17: Action On Purge
18: Done
Select parameter to modify (1-18):
14


This will apply the volume retentions defined in the pool to all volumes in that pool.
--
Mit freundlichen Grüßen

Philipp Storz philip...@bareos.com
Bareos GmbH & Co. KG Phone: Phone: +49221630693-92
http://www.bareos.com Fax: +49221630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Geschäftsführer: Stephan Dühr, M. Außendorf,
J. Steffens, P. Storz, M. v. Wieringen

birgit.ducarroz

unread,
Jun 9, 2020, 7:59:41 AM6/9/20
to bareos-users
Just saw an issue:

Error updating Volume records: ERR=cats/sql_update.cc:444 Update failed: affected_rows=0 for UPDATE Media SET ActionOnPurge=0,Recycle=1,VolRetention=31536000,VolUseDuration=0,MaxVolJobs=0,MaxVolFiles=0,MaxVolBytes=0,RecyclePoolId=0,MinBlocksize=0,MaxBlocksize=0 WHERE PoolId=1

"We get an error when calling "update all volumes from all pools" when one pool doesn't have any volumes.
It would be better to improve the sql query to only try to update volumes if there are volumes."
--> which might be the case of the scratch pool.

So to avoid this error, you can select
update --> 1 -->13 and then select each pool
Reply all
Reply to author
Forward
0 new messages