Appearance
sys.restore
This system view captures information about active restore (ybrestore
) operations. The columns in this view are the same as the columns in sys.log_restore.
Example
In this example, the ybsql \watch
command tracks the progress of a running database restore operation and returns results every 5 seconds.
premdb=# select * from sys.restore;
(0 rows)
premdb=# \watch 5
(0 rows)
(0 rows)
Watch every 5s Tue Jun 22 15:15:42 2021
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key | TED9yW3bVpOtR-syMZcm_3K5smzR2mTqqbE16MOCP8xRSi_9EVFNPjottbzjojY=
session_id | 608313
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb_full_restore
database_id | 19579
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2021-06-22 15:15:14-08
end_time | [NULL]
elapsed_ms | 3375
remaining_ms | -1
received_bytes | 12941
received_bytes_per_sec | 3834.370361
storage_bytes | 3741
storage_bytes_per_sec | 1108.444458
backup_point_id | June22Full
chain_id | June2021
source_database_name | premdb
source_appliance_name | localhost
table_name | [NULL]
Watch every 5s Tue Jun 22 15:15:47 2021
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key | TED9yW3bVpOtR-syMZcm_3K5smzR2mTqqbE16MOCP8xRSi_9EVFNPjottbzjojY=
session_id | 608313
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb_full_restore
database_id | 19579
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2021-06-22 15:15:14-08
end_time | [NULL]
elapsed_ms | 8392
remaining_ms | 8912000
received_bytes | 182719258
received_bytes_per_sec | 21773028
storage_bytes | 552786
storage_bytes_per_sec | 65870.59375
backup_point_id | June22Full
chain_id | June2021
source_database_name | premdb
source_appliance_name | localhost
table_name | [NULL]
Watch every 5s Tue Jun 22 15:15:52 2021
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key | TED9yW3bVpOtR-syMZcm_3K5smzR2mTqqbE16MOCP8xRSi_9EVFNPjottbzjojY=
session_id | 608313
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb_full_restore
database_id | 19579
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2021-06-22 15:15:14-08
end_time | [NULL]
elapsed_ms | 13405
remaining_ms | 22000
received_bytes | 487804302
received_bytes_per_sec | 36389728
storage_bytes | 552786
storage_bytes_per_sec | 41237.300781
backup_point_id | June22Full
chain_id | June2021
source_database_name | premdb
source_appliance_name | localhost
table_name | [NULL]
Watch every 5s Tue Jun 22 15:15:57 2021
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key | TED9yW3bVpOtR-syMZcm_3K5smzR2mTqqbE16MOCP8xRSi_9EVFNPjottbzjojY=
session_id | 608313
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb_full_restore
database_id | 19579
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2021-06-22 15:15:14-08
end_time | [NULL]
elapsed_ms | 43490
remaining_ms | 2000
received_bytes | 1807300426
received_bytes_per_sec | 41556688
storage_bytes | 1806697658
storage_bytes_per_sec | 41542828
backup_point_id | June22Full
chain_id | June2021
source_database_name | premdb
source_appliance_name | localhost
table_name | [NULL]
Watch every 5s Tue Jun 22 15:16:02 2021
-[ RECORD 1 ]----------+-----------------------------------------------------------------
session_key | TED9yW3bVpOtR-syMZcm_3K5smzR2mTqqbE16MOCP8xRSi_9EVFNPjottbzjojY=
session_id | 608313
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb_full_restore
database_id | 19579
state | DONE
error_string | [NULL]
start_time | 2021-06-22 15:15:14-08
end_time | 2021-06-22 15:16:00-08
elapsed_ms | 45717
remaining_ms | 0
received_bytes | 1807301704
received_bytes_per_sec | 39532376
storage_bytes | 1806698912
storage_bytes_per_sec | 39519192
backup_point_id | June22Full
chain_id | June2021
source_database_name | premdb
source_appliance_name | localhost
table_name | [NULL]
Parent topic:System Views