[Bacula-users] Purge all volumes in a pool

2016-04-04 Thread bdam
Ahh ... and that helps with what I really want to do. If there are already purged volumes, I want to "re purge them!". The reason is, I want the order they are purged to be from the start to the end, so that the dates are in that sequence and when the pool is used it will prompt for the tapes

Re: [Bacula-users] Purge all volumes in a pool

2016-04-04 Thread Heitor Faria
> Thanks, and hope everything is ok re hospital. > > It now fails when it finds a volume with VolStatus "Recycle": Hello, Bill. My mistake again, since I excluded the expression Recycled, and not Recycle. Now it should work: for volname in $(echo "list media pool=File" |bconsole | grep -v -e

Re: [Bacula-users] Purge all volumes in a pool

2016-04-04 Thread Wanderlei Huttel
Hello Bill It's not failing. if you read previous emails sent by you you will see this message: This command can be DANGEROUS!!! It purges (deletes) all Files from a Job, JobId, Client or Volume; or it purges (deletes) all Jobs from a Client or Volume without regard to retention periods.

[Bacula-users] Purge all volumes in a pool

2016-04-04 Thread bdam
Thanks, and hope everything is ok re hospital. It now fails when it finds a volume with VolStatus "Recycle": Connecting to Director tiger:9101 1000 OK: 102 tiger-dir Version: 7.4.0 (16 January 2016) Enter a period to cancel a command. purge volume=001-011-61 This command can be DANGEROUS!!!

Re: [Bacula-users] Purge all volumes in a pool

2016-04-03 Thread Heitor Faria
ut -f 3 -d '|' | tail -3 | tr -d " " | grep -v -e "+-"); do echo purge volume=$volname |bconsole; done - Original Message - > From: "bdam" <bacula-fo...@backupcentral.com> > To: bacula-users@lists.sourceforge.net > Sent: Sunday, April 3, 2016

[Bacula-users] Purge all volumes in a pool

2016-04-03 Thread bdam
Connecting to Director tiger:9101 1000 OK: 102 tiger-dir Version: 7.4.0 (16 January 2016) Enter a period to cancel a command. purge volume=001-012-60 This command can be DANGEROUS!!! It purges (deletes) all Files from a Job, JobId, Client or Volume; or it purges (deletes) all Jobs from a

Re: [Bacula-users] Purge all volumes in a pool

2016-04-03 Thread Heitor Faria
Hello, Bill. Can you try this? for volname in $(echo "list media pool=File" |bconsole | grep -v PurgedĀ  | cut -f 3 -d '|' | tail -3 | tr -d " " | grep -v -e "+-"); do echo purge volume=$volname |bconsole; done === Heitor

[Bacula-users] Purge all volumes in a pool

2016-04-03 Thread bdam
Thankyou Heitor, it's nearly there (the second one) but it fails if any of the tapes are already purged: Connecting to Director tiger:9101 1000 OK: 102 tiger-dir Version: 7.4.0 (16 January 2016) Enter a period to cancel a command. purge volume=001-036 This command can be DANGEROUS!!! It purges

Re: [Bacula-users] Purge all volumes in a pool

2016-04-02 Thread Heitor Faria
>> Is there one command to purge a pool? It's tedious going through each single >> volume for large sets. > > Hello, Bill: I think there is not. You can purge a volume with a single line > command in bconsole (purge volume=volume_name), or use the bellow script > changing the Pool Name: > > for

Re: [Bacula-users] Purge all volumes in a pool

2016-04-02 Thread Heitor Faria
> Is there one command to purge a pool? It's tedious going through each single > volume for large sets. Hello, Bill: I think there is not. You can purge a volume with a single line command in bconsole (purge volume=volume_name), or use the bellow script changing the Pool Name: for volname in

[Bacula-users] Purge all volumes in a pool

2016-04-02 Thread bdam
Is there one command to purge a pool? It's tedious going through each single volume for large sets. +-- |This was sent by bill.dam...@yahoo.com via Backup Central. |Forward SPAM to ab...@backupcentral.com.