sys.log_backup

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

Column Name Data Type Description
session_key text Unique session key generated for the backup operation.
session_id bigint Unique ID of the ybbackup session, as logged in sys.session and sys.log_session.
client_hostname text Client host name, if available.
client_username text Operating system user on the client system who is running the backup tool.
user_name text Name of the database user, as passed in on the ybbackup command line (or set with YBUSER).
user_id bigint Unique ID of the database user.
database_name text Name of the database that was backed up.
database_id bigint Unique ID of the database that was backed up.
state text Current state of the backup operation, such as USER_DATA_RUNNING or DONE.
error_string text Error 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_time timestamptz When the ybbackup command started running.
end_time timestamptz When the ybbackup command completed.
elapsed_ms bigint Time spent running the backup (in milliseconds).
remaining_ms bigint Time remaining to complete the backup (in milliseconds).
sent_bytes bigint Number 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_sec double precision Number of bytes per second transferred over the network.
storage_bytes bigint Number of bytes of backup data written to the storage system.
storage_bytes_per_sec double precision Number of bytes per second being written to the storage system.
backup_point_id text Backup name as specified with the ybbackup --name option.
chain_id text Name of the backup chain.
type text Backup 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