With the following barman command we can see the backup status, while STARTED/FAILED status indicated that backup inst created successfully
barman list-backup main-db-server
Output:
main-db-server 20170913T115706 - STARTED
main-db-server 20170913T115214 - STARTED
main-db-server 20170913T114659 - STARTED
main-db-server 20170912T233003 - FAILED
main-db-server 20170912T145147 - Tue Sep 12 14:51:50 2017 - Size: 45.2 MiB - WAL Size: 68.6 KiB
main-db-server 20170912T140611 - Tue Sep 12 14:06:14 2017 - Size: 41.2 MiB - WAL Size: 6.3 MiB
main-db-server 20170912T140430 - Tue Sep 12 14:04:36 2017 - Size: 41.2 MiB - WAL Size: 38.6 KiB
Is it possible in some way to pipe after the the barman syntax the tput command in order to marked the lines with FAILED/STARTED with red color, so the user can identify this lines as bad backup's?
Example:
barman list-backup main-db-server | ... tput setaf 1 ... tput sgr0
remark - "tput setaf 1" --> will paint the characters with red
You can use grep for that
barman list-backup main-db-server | grep -E 'FAILED|STARTED' | ... tput setaf 1 ... tput sgr0