BBR Exit Codes and Logging
This topic provides information about the exit codes returned by BBR and BBR logging. Use this information when troubleshooting a failed backup or restore using BBR.
The exit code returned by BBR indicates the status of the backup or restore. The following table matches exit codes to error messages.
|4||The pre-backup lock failed.|
|8||The post-backup unlock failed. Your BOSH deployment or BOSH Director may be in a bad state and require attention.|
|16||The cleanup failed. This is a non-fatal error indicating that the utility has been unable to clean up open BOSH SSH connections to the deployment VMs. Manual cleanup may be required to clear any hanging BOSH users and connections.|
If multiple failures occur, your exit code reflects a combination of values. Use bitwise AND to determine which failures occurred.
For example, the exit code
5 indicates that the pre-backup lock failed and a general error occurred.
To check that a bit is set, use bitwise AND, as demonstrated by the following example of exit code
20 | 1 == 1 # false 20 | 4 == 4 # true; lock failed 20 | 8 == 8 # false 20 | 16 == 16 # true; cleanup failed
20 indicates that the pre-backup lock failed and cleanup failed.
By default, BBR displays the following:
- The backup and restore scripts that it finds
- When it starts or finishes a stage, such as
- When the process is complete
- When any error occurs
BBR writes any errors associated with stack traces to a file in of the form
bbr-TIMESTAMP.err.log in the current directory.
If more logging is needed, use the optional
--debug flag to print the following information:
- Logs about the API requests made to the BOSH server
- All commands executed on remote instances
- All commands executed on local environment
- Standard in and standard out streams for the backup and restore scripts when they are executed