Skip to content

sys.log_restore

This view records the history of restore (ybrestore) operations.

Column NameData TypeDescription
session_keytextUnique session key generated for the restore operation.
session_idbigintUnique ID of the ybrestore session.
client_hostnametextClient host name, if available.
client_usernametextOperating system user on the client system who is running the restore tool.
user_nametextName of the database user, as passed in on the ybrestore command line (or set with YBUSER).
user_idbigintUnique ID of the database user.
database_nametextName of the restored database.
database_idbigintUnique ID of the restored database.
statetextCurrent state of the restore operation, such as USER_DATA_RUNNING or DONE.
error_stringtextError message reported for a failed restore. For example, if a restore is cancelled before it completes, the view may report an External data socket error.
start_timetimestamptzWhen the ybrestore command started running.
end_timetimestamptzWhen the ybrestore command completed.
elapsed_msbigintTime spent running the restore (in milliseconds).
remaining_msbigintTime remaining to complete the restore (in milliseconds).
received_bytesbigintNumber of bytes transferred over the network.
received_bytes_per_secdouble precisionNumber of bytes per second transferred over the network.
storage_bytesbigintNumber of bytes stored in the target location.
storage_bytes_per_secdouble precisionNumber of bytes per second being stored in the target location.
backup_point_idtextBackup name as specified with the ybbackup --name option.
chain_idtextName of the backup chain.
source_database_nametextName of the source database for the restore (not the restored database name in the case of a database being restored to an alias).
source_appliance_nametextName of the appliance where the database was backed up.

Example

premdb=# select * from sys.log_restore;
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key            | BSz3VTMYTqbeX6AR-QspATzuMelRcjI_WlkdaIL9EOjpm49witdmc20HCncmI4It
session_id             | 40984
client_hostname        | localhost
client_username        | yb100
user_name              | yb100
user_id                | 16417
database_name          | premdb_restored
database_id            | 16428
state                  | DONE
error_string           | [NULL]
start_time             | 2020-01-13 18:19:49.381-08
end_time               | 2020-01-13 18:20:07.967-08
elapsed_ms             | 18586
remaining_ms           | 0
received_bytes         | 8121140
received_bytes_per_sec | 436949.316689982
storage_bytes          | 8111423
storage_bytes_per_sec  | 436426.50382008
backup_point_id        | Jan13Full
chain_id               | January2020
source_database_name   | premdb
source_appliance_name  | localhost

Parent topic:System Views