> 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 Purged -e Recycle -e messages | cut -f 3 -d '|' | tail -3 | tr -d " " | grep -v -e "+-----"); do echo purge volume=$volname |bconsole; done > > 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-000061 > > 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" > 0 File on Volume "001-011-000061" purged from catalog. > There are no more Jobs associated with Volume "001-011-000061". Marking it > purged. > > You have messages. > 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-013-000059 > > 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-013-000059" has VolStatus "Recycle" and cannot be purged. > The VolStatus must be: Append, Full, Used, or Error to be purged. > > +---------------------------------------------------------------------- >|This was sent by bill.dam...@yahoo.com via Backup Central. >|Forward SPAM to ab...@backupcentral.com. > +---------------------------------------------------------------------- > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users -- ======================================================================= 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 ======================================================================== ------------------------------------------------------------------------------ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users