[ 
https://issues.apache.org/jira/browse/HBASE-28991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vinayak Hegde updated HBASE-28991:
----------------------------------
    Description: 
h3. PITR Command Implementation
h4. Current "restore" Command
{code:java}
hbase restore <backup_path> <backup_id> 
    [-t <table_name[,table_name]>] 
    [-s <backup_set_name>] 
    [-q <name>] 
    [-c] 
    [-m <target_tables>] 
    [-o] {code}
h4. New "pitr" Command
{code:java}
hbase pitr 
    [-t <table_name[,table_name]>] 
    [-s <backup_set_name>] 
    [-q <name>] 
    [-c] 
    [-m <target_tables>] 
    [-o] 
    [--to-datetime <end_time>] 
    [--backup-path <backup_path>]{code}
h4. Process for Each Table:
 # Identify the most recent backup taken *before* the {{--to-datetime}} 
timestamp and execute the {{restore}} command for that table. This will apply 
both full and incremental snapshots.
 # Determine the WAL (Write-Ahead Log) replay duration, covering logs generated 
after the last backup and before {{{}--to-datetime{}}}.
 # Invoke *WALPlayer* with the {{{}backupdir{}}}, {{{}from-time{}}}, and 
{{to-time}} parameters to perform WAL replay.

h4. WAL Replay Details:
 * The eligible day directories will be provided as a {*}comma-separated 
list{*}.

 

*New Option:* {{--backup-path <backup_path>}}

This option allows users to explicitly specify the backup path, ensuring that 
eligible backups are searched in the provided location. It is particularly 
useful when backups have been manually moved to a different location, and the 
HBase system is not aware of the new path.

  was:
The PITR command restores table data to a specific point in time using a 
combination of full backups, incremental backups, and WALs. If no end time is 
specified, it defaults to the current time.

{*}Command{*}:
{code:java}
$ hbase pitr [-t <table_name[,table_name]>] 
[-s <backup_set_name>] 
[-q <name>] 
[-c] 
[-m <target_tables>] 
[-o]
[--to-datetime <end_time>] {code}
{*}Options{*}:
 * -to-datetime <end_time>: _(Optional)_ Specifies the end time for 
restoration. Defaults to the current time if not provided.

 

{*}Description{*}:
 * For each specified table:
 * Locate the most recent full backup taken before the -to-datetime.
 * Apply the full backup, followed by all incremental backups up to the 
specified point.
 * Replay the WALs to bring the data to the exact state as of -to-datetime.


> Introduce "pitr" Command for Point-in-Time Recovery/Restore
> -----------------------------------------------------------
>
>                 Key: HBASE-28991
>                 URL: https://issues.apache.org/jira/browse/HBASE-28991
>             Project: HBase
>          Issue Type: Task
>          Components: backup&amp;restore
>    Affects Versions: 2.6.0, 3.0.0-alpha-4
>            Reporter: Vinayak Hegde
>            Assignee: Vinayak Hegde
>            Priority: Major
>
> h3. PITR Command Implementation
> h4. Current "restore" Command
> {code:java}
> hbase restore <backup_path> <backup_id> 
>     [-t <table_name[,table_name]>] 
>     [-s <backup_set_name>] 
>     [-q <name>] 
>     [-c] 
>     [-m <target_tables>] 
>     [-o] {code}
> h4. New "pitr" Command
> {code:java}
> hbase pitr 
>     [-t <table_name[,table_name]>] 
>     [-s <backup_set_name>] 
>     [-q <name>] 
>     [-c] 
>     [-m <target_tables>] 
>     [-o] 
>     [--to-datetime <end_time>] 
>     [--backup-path <backup_path>]{code}
> h4. Process for Each Table:
>  # Identify the most recent backup taken *before* the {{--to-datetime}} 
> timestamp and execute the {{restore}} command for that table. This will apply 
> both full and incremental snapshots.
>  # Determine the WAL (Write-Ahead Log) replay duration, covering logs 
> generated after the last backup and before {{{}--to-datetime{}}}.
>  # Invoke *WALPlayer* with the {{{}backupdir{}}}, {{{}from-time{}}}, and 
> {{to-time}} parameters to perform WAL replay.
> h4. WAL Replay Details:
>  * The eligible day directories will be provided as a {*}comma-separated 
> list{*}.
>  
> *New Option:* {{--backup-path <backup_path>}}
> This option allows users to explicitly specify the backup path, ensuring that 
> eligible backups are searched in the provided location. It is particularly 
> useful when backups have been manually moved to a different location, and the 
> HBase system is not aware of the new path.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to