Este breve artículo explica cómo listar las tareas de backup en estado de error desde línea de comandos en Bacula.
Abrir la consola de Bacula:
root@baku:~# bconsole Connecting to Director 192.168.50.2:9101 1000 OK: 102 baku-dir Version: 7.4.4 (28 September 2016) Enter a period to cancel a command. *
Luego ejecutar el comando list jobs jobstatus=E
:
*list jobs jobstatus=E +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+ | jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus | +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+ | 2,145 | BackupArchivosLocales | 2018-11-29 23:05:01 | B | I | 2 | 878 | E | | 2,147 | BackupCatalog | 2018-11-30 01:31:21 | B | F | 0 | 0 | E | +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+
También es posible ejecutar el comando directamente desde la shell utilizando un pipe:
root@baku:~# echo "list jobs jobstatus=E" | bconsole Connecting to Director 192.168.50.2:9101 1000 OK: 102 baku-dir Version: 7.4.4 (28 September 2016) Enter a period to cancel a command. list jobs jobstatus=E Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+ | jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus | +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+ | 2,145 | BackupArchivosLocales | 2018-11-29 23:05:01 | B | I | 2 | 878 | E | | 2,147 | BackupCatalog | 2018-11-30 01:31:21 | B | F | 0 | 0 | E | +-------+-----------------------+---------------------+------+-------+----------+----------+-----------+
Los estados posibles por los que puede pasar un trabajo de backup en Bacula son:
A Canceled by user B Blocked C Created, but not running c Waiting for client resource D Verify diferences d Waiting for maximum jobs E Terminated in error e Non-fatal error f fatal error F Waiting on File Daemon j Waiting for job resource M Waiting for mount m Waiting for new media p Waiting for higher priority jobs to finish R Running S Scan s Waiting for storage resource T Terminated normally t Waiting for start time
Si se trata de trabajos de backup críticos, será necesario ejecutarlos manualmente, tal como se muestra en el artículo Cómo instalar y configurar Bacula en Debian. De lo contrario esperar a la próxima corrida automática.
Referencias
- Frequently Asked Questions Supplement - Bacula DokuWiki
- Bacula Console - Bacula Console and Operators Guide