Appearance
sys.restore_legacy
This system view captures information about active restore (ybrestore
) operations that are run with pre-Version 4.0 legacy tools.
Column Name | Data Type | Description |
---|---|---|
session_key | text | Unique session key generated for the restore operation. |
state | text | Current state of the restore operation, such as RUNNING or DONE . |
error_string | text | Error message reported for a failed restore. |
object_id | bigint | Unique ID of the database that was restored. |
user_id | bigint | Unique ID of the database user. |
session_id | bigint | Unique ID of the ybrestore session. |
object_name | text | Name of the restored database (this may be an alias that was specified in the ybrestore command). |
user_name | text | Name of the database user, as passed in on the ybrestore command line (or set with YBUSER ). |
client_hostname | text | Client host name, if available. |
client_username | text | Operating system user on the client system who is running the restore tool. |
start_time | timestamptz | When the ybrestore command started running. |
last_activity_time | timestamptz | When ybrestore activity was last logged. |
transaction_id | bigint | Unique transaction ID for the restore. |
backup_name | text | Name of the restored backup (as specified with --name in the ybbackup command). |
directories | text | Directory location where the backup is stored for this restore operation. |
sent_bytes | bigint | Number of bytes transferred over the network. |
sent_bytes_per_second | double precision | Number of bytes per second transferred over the network. |
nodata | boolean | Whether this restore was from a "nodata" backup (metadata only). |
tables_completed | bigint | Number of tables completely restored. |
total_tables | bigint | Total number of tables to be restored. |
Example
The following query reports the progress of a single restore operation.
premdb=# select * from sys.restore where start_time > '2018-12-04 13:25:00-07';
(0 rows)
premdb=# \watch 3
(0 rows)
...
Watch every 3s Fri Dec 4 13:29:05 2018
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | Cy8_loaiYoBkniu8T8kp2bIeDytL56RedlPioDCpCXMl8-BU363zB6cTnAbY4nv2
state | RUNNING
error_string | [NULL]
object_id | 16481
user_id | 16399
session_id | 16470
object_name | newpremdb
user_name | bobr
client_hostname | localhost
client_username | brumsby
start_time | 2018-12-04 13:29:04-07
last_activity_time | 2018-12-04 13:29:05-07
transaction_id | 6688
backup_name | dec04
directories | [/home/brumsby/premdb_backups]
sent_bytes | 2305
sent_bytes_per_second | 2305
nodata | f
tables_completed | 2
total_tables | 6
...
Watch every 3s Fri Dec 4 13:29:08 2018
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | Cy8_loaiYoBkniu8T8kp2bIeDytL56RedlPioDCpCXMl8-BU363zB6cTnAbY4nv2
state | RUNNING
error_string | [NULL]
object_id | 16481
user_id | 16399
session_id | 16470
object_name | newpremdb
user_name | bobr
client_hostname | localhost
client_username | brumsby
start_time | 2018-12-04 13:29:04-07
last_activity_time | 2018-12-04 13:29:07-07
transaction_id | 6688
backup_name | dec04
directories | [/home/brumsby/premdb_backups]
sent_bytes | 267766
sent_bytes_per_second | 89255.3333333333
nodata | f
tables_completed | 5
total_tables | 6
...
Watch every 3s Fri Dec 4 13:29:53 2018
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | Cy8_loaiYoBkniu8T8kp2bIeDytL56RedlPioDCpCXMl8-BU363zB6cTnAbY4nv2
state | DONE
error_string | [NULL]
object_id | 16481
user_id | 16399
session_id | 16470
object_name | newpremdb
user_name | bobr
client_hostname | localhost
client_username | brumsby
start_time | 2018-12-04 13:29:04-07
last_activity_time | 2018-12-04 13:29:35-07
transaction_id | 6688
backup_name | dec04
directories | [/home/brumsby/premdb_backups]
sent_bytes | 1246826127
sent_bytes_per_second | 40220197.6451613
nodata | f
tables_completed | 6
total_tables | 6
Parent topic:System Views