Skip to content

sys.log_backup

This view records the history of backup (ybbackup) operations.

Column NameData TypeDescription
session_keytextUnique session key generated for the backup operation.
session_idbigintUnique ID of the ybbackup session, as logged in sys.session and sys.log_session.
client_hostnametextClient host name, if available.
client_usernametextOperating system user on the client system who is running the backup tool.
user_nametextName of the database user, as passed in on the ybbackup command line (or set with YBUSER).
user_idbigintUnique ID of the database user.
database_nametextName of the database that was backed up.
database_idbigintUnique ID of the database that was backed up.
statetextCurrent state of the backup operation, such as USER_DATA_RUNNING or DONE.
error_stringtextError message reported for a failed backup. For example, if a backup is cancelled before it completes, the view may report an External data socket error.
start_timetimestamptzWhen the ybbackup command started running.
end_timetimestamptzWhen the ybbackup command completed.
elapsed_msbigintTime spent running the backup (in milliseconds).
remaining_msbigintTime remaining to complete the backup (in milliseconds).
sent_bytesbigintNumber of bytes of backup data transferred over the network, including some overhead for the backup and restore communication protocol. (sent_bytes and storage_bytes are not expected to match, either during a backup or when it completes.)
sent_bytes_per_secdouble precisionNumber of bytes per second transferred over the network.
storage_bytesbigintNumber of bytes of backup data written to the storage system.
storage_bytes_per_secdouble precisionNumber of bytes per second being written to the storage system.
backup_point_idtextBackup name as specified with the ybbackup --name option.
chain_idtextName of the backup chain.
typetextBackup type: F (full), I (incremental), C (cumulative).

Example

Return information about the backups in a specific backup chain:

premdb=# select * from sys.log_backup where chain_id='February2020';
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key           | DOl8lbUDTtILPRROKMN_jxrgAWO1DUJzJeKyijalbb-CHZgO2crMI8yh4Y_HqQM5
session_id            | 18646
client_hostname       | localhost
client_username       | yb100
user_name             | yb100
user_id               | 16418
database_name         | premdb
database_id           | 16395
state                 | DONE
error_string          | [NULL]
start_time            | 2020-02-14 16:37:56.752-08
end_time              | 2020-02-14 16:38:05.154-08
elapsed_ms            | 8402
remaining_ms          | 0
sent_bytes            | 35281796
sent_bytes_per_sec    | 4199213.99666746
storage_bytes         | 35289956
storage_bytes_per_sec | 4200185.19400143
backup_point_id       | Feb14Full
chain_id              | February2020
type                  | F
-[ RECORD 2 ]---------+-----------------------------------------------------------------
session_key           | BNJyx7CXbkRr9STxe8FCgER2EdZUyjf8L5aZXoHYraWVtuUoZJQF_lrOHWLuwSA6
session_id            | 335742
client_hostname       | localhost
client_username       | yb100
user_name             | yb100
user_id               | 16418
database_name         | premdb
database_id           | 16395
state                 | DONE
error_string          | [NULL]
start_time            | 2020-02-16 21:09:25.728-08
end_time              | 2020-02-16 21:10:47.788-08
elapsed_ms            | 82060
remaining_ms          | 0
sent_bytes            | 1771417116
sent_bytes_per_sec    | 21586852.4981721
storage_bytes         | 1772002572
storage_bytes_per_sec | 21593986.9851328
backup_point_id       | Feb16Inc
chain_id              | February2020
type                  | I

Parent topic:System Views