Appearance
sys.backup
This system view captures information about active backup (ybbackup
) operations. The columns in this view are the same as the columns in sys.log_backup.
Example
In this example, the ybsql \watch
command tracks the progress of a running backup operation and returns results every 5 seconds.
premdb=# select * from sys.backup;
(0 rows)
premdb=# \watch 5
(0 rows)
(0 rows)
Watch every 5s Tue Feb 18 15:07:51 2020
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | DzTlIEcb4E1EYW0BfHbo1mzMj9vuPskwWriWw3JowgAVscEKXVHO3y0gx5KG83a5
session_id | 607424
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb
database_id | 16395
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2020-02-18 15:07:47-08
end_time | [NULL]
elapsed_ms | 4739
remaining_ms | 28000
sent_bytes | 275221394
sent_bytes_per_sec | 58075836
storage_bytes | 275312522
storage_bytes_per_sec | 58095068
backup_point_id | Feb18Full
chain_id | February2020
type | F
Watch every 5s Tue Feb 18 15:07:56 2020
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | DzTlIEcb4E1EYW0BfHbo1mzMj9vuPskwWriWw3JowgAVscEKXVHO3y0gx5KG83a5
session_id | 607424
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb
database_id | 16395
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2020-02-18 15:07:47-08
end_time | [NULL]
elapsed_ms | 9754
remaining_ms | 10000
sent_bytes | 837437948
sent_bytes_per_sec | 85855848
storage_bytes | 837715148
storage_bytes_per_sec | 85884264
backup_point_id | Feb18Full
chain_id | February2020
type | F
Watch every 5s Tue Feb 18 15:08:02 2020
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | DzTlIEcb4E1EYW0BfHbo1mzMj9vuPskwWriWw3JowgAVscEKXVHO3y0gx5KG83a5
session_id | 607424
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb
database_id | 16395
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2020-02-18 15:07:47-08
end_time | [NULL]
elapsed_ms | 14767
remaining_ms | 12000
sent_bytes | 1398798687
sent_bytes_per_sec | 94724632
storage_bytes | 1399260807
storage_bytes_per_sec | 94755928
backup_point_id | Feb18Full
chain_id | February2020
type | F
Watch every 5s Tue Feb 18 15:08:07 2020
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | DzTlIEcb4E1EYW0BfHbo1mzMj9vuPskwWriWw3JowgAVscEKXVHO3y0gx5KG83a5
session_id | 607424
client_hostname | localhost
client_username | yb100
user_name | yb100
user_id | 16418
database_name | premdb
database_id | 16395
state | USER_DATA_RUNNING
error_string | [NULL]
start_time | 2020-02-18 15:07:47-08
end_time | [NULL]
elapsed_ms | 19829
remaining_ms | 25000
sent_bytes | 1746924788
sent_bytes_per_sec | 88099488
storage_bytes | 1747502012
storage_bytes_per_sec | 88128600
backup_point_id | Feb18Full
chain_id | February2020
type | F
Watch every 5s Tue Feb 18 15:08:12 2020
-[ RECORD 1 ]---------+-----------------------------------------------------------------
session_key | DzTlIEcb4E1EYW0BfHbo1mzMj9vuPskwWriWw3JowgAVscEKXVHO3y0gx5KG83a5
session_id | 607424
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-18 15:07:47-08
end_time | 2020-02-18 15:08:08-08
elapsed_ms | 21014
remaining_ms | 0
sent_bytes | 1806698912
sent_bytes_per_sec | 85975968
storage_bytes | 1807292528
storage_bytes_per_sec | 86004216
backup_point_id | Feb18Full
chain_id | February2020
type | F
...
Parent topic:System Views