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 Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified Administrator II
Próximas aulas telepresencial ao-vivo - 15 de fevereiro: http://www.bacula.com.br/agenda/
Ministro treinamento e implementação in-company Bacula: http://www.bacula.com.br/in-company/
Ou assista minhas videoaulas on-line: http://www.bacula.com.br/treinamento-bacula-ed/
61 8268-4220
Site: www.bacula.com.br | Facebook: heitor.faria
========================================================================
Enviado por TypeApp
Em 3 de abr de 2016, em 1:09 PM, bdam < bacula-forum AT backupcentral DOT com> escreveu:
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 (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. Normally you should use the PRUNE command, which respects retention periods. Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog"
Volume "001-036" has VolStatus "Purged" and cannot be purged. The VolStatus must be: Append, Full, Used, or Error to be purged.
+
|This was sent by bill.damage AT yahoo DOT com via Backup Central. |Forward SPAM to abuse AT backupcentral DOT com. +
Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
Bacula-users mailing list Bacula-users AT lists.sourceforge DOT net https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|