Appearance
sys.log_restore
This view records the history of restore (ybrestore
) operations.
Column Name | Data Type | Description |
---|---|---|
session_key | text | Unique session key generated for the restore operation. |
session_id | bigint | Unique ID of the ybrestore session. |
client_hostname | text | Client host name, if available. |
client_username | text | Operating system user on the client system who is running the restore tool. |
user_name | text | Name of the database user, as passed in on the ybrestore command line (or set with YBUSER ). |
user_id | bigint | Unique ID of the database user. |
database_name | text | Name of the restored database. |
database_id | bigint | Unique ID of the restored database. |
state | text | Current state of the restore operation, such as USER_DATA_RUNNING or DONE . |
error_string | text | Error 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_time | timestamptz | When the ybrestore command started running. |
end_time | timestamptz | When the ybrestore command completed. |
elapsed_ms | bigint | Time spent running the restore (in milliseconds). |
remaining_ms | bigint | Time remaining to complete the restore (in milliseconds). |
received_bytes | bigint | Number of bytes transferred over the network. |
received_bytes_per_sec | double precision | Number of bytes per second transferred over the network. |
storage_bytes | bigint | Number of bytes stored in the target location. |
storage_bytes_per_sec | double precision | Number of bytes per second being stored in the target location. |
backup_point_id | text | Backup name as specified with the ybbackup --name option. |
chain_id | text | Name of the backup chain. |
source_database_name | text | Name 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_name | text | Name 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