cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.07k stars 3.8k forks source link

backupccl: increase observability around restore AOST options on backups without revision history #86380

Open msbutler opened 2 years ago

msbutler commented 2 years ago

Ideally, if a user wants to run an AOST RESTORE on non-revision history backups, they should be able to gather the proper start times from a SHOW BACKUP stmt. Currently, this is hard during the following cases:

  1. SHOW BACKUP does not display the time that an AOST RESTORE can be used on a full backup w/o revision history, as the start_time is left null. E.g.
root@:26257/defaultdb> show backup 'nodelocal://1/backup/2022/08/17-185556.43';
  database_name | parent_schema_name |      object_name       | object_type | backup_type |        start_time         |          end_time          | size_bytes |  rows  | is_full_cluster
----------------+--------------------+------------------------+-------------+-------------+---------------------------+----------------------------+------------+--------+------------------
  NULL          | NULL               | system                 | database    | full        | NULL                      | 2022-08-17 18:55:56.43398  |       NULL |   NULL |      true
  system        | public             | users                  | table       | full        | NULL                      | 2022-08-17 18:55:56.43398  |        312 |      4 |      true
  1. During an ad-hoc chain of backups w/o revision history, the start time displayed in SHOW BACKUP may not match the actual precision required to find that given backup.

Once these UX papercuts are addressed, this docs issue should get addressed.

Jira issue: CRDB-18729

blathers-crl[bot] commented 2 years ago

cc @cockroachdb/bulk-io

baoalvin1 commented 1 year ago

Closing this issue due to the fact that AOST RESTORE on non-revision history backups should use the end time from a SHOW BACKUP statement. Verified that this worked in 22.2.0.