Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#20493] yugabyted: Providing support for PITR through yugabyted CLI.
Summary: This diff introduces a new sub-command `configure point_in_time_recovery` under the `configure` top-level command in yugabyted. This enhancement enables users to run PITR operations for specific databases or keyspaces through `yugabyted`. **Adding the following functionalities for PITR** The following flags have been added to sub-command `configure point_in_time_recovery`: # //--enable//: Enable point-in-time recovery for a database or keyspace. # //--disable//: Disable point-in-time recovery for a database or keyspace. # //--status//: Display point-in-time recovery status for a YugabyteDB cluster. # //--retention//: Determines the duration for which each snapshot is to be retained. # //--database//: Name of the YSQL database for which point-in-time recovery is being configured. # //--keyspace//: Name of the YCQL keyspace for which point-in-time recovery is being configured. The following flag have been added to the top-level command `restore`: # //--recover_to_point_in_time//: Triggers the restoration of the database or keyspace to the state at the specified timestamp. **User journey to run PITR operations** 1. Enable PITR for database `postgres` Command: ``` ./yugabyted configure point_in_time_recovery \ --enable --database postgres --retention 10 ``` 2. Display PITR status for database `postgres` Command: ``` ./yugabyted configure point_in_time_recovery \ --status --database postgres ``` Alternatively PITR status for all databases and keyspaces can also be displayed using: Command: ``` ./yugabyted configure point_in_time_recovery \ --status ``` 3. Recover to a point in time for database `postgres` Command: ``` ./yugabyted restore --recover_to_point_in_time 2024-01-29 9:30:00 PM \ --database postgres ``` 4. Disable PITR for database `postgres` Command: ``` ./yugabyted configure point_in_time_recovery \ --disable --database postgres ``` Jira: DB-9501 Test Plan: Manual Testing. Reviewers: sgarg-yb, nikhil Reviewed By: sgarg-yb, nikhil Subscribers: yugabyted-dev, shikhar.sahay Differential Revision: https://phorge.dev.yugabyte.com/D32012
- Loading branch information