You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Vinayak Hegde (Jira)" <ji...@apache.org> on 2025/05/07 04:35:00 UTC
[jira] [Commented] (HBASE-29133) Implement "pitr" Command for Point-in-Time Recovery/Restore
[ https://issues.apache.org/jira/browse/HBASE-29133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949893#comment-17949893 ]
Vinayak Hegde commented on HBASE-29133:
---------------------------------------
Thanks, [~kgeiszler], for the review.
Yes, it's the {{-c}} flag — it simply checks whether everything is valid and that PITR can be performed.
Regarding the snapshot timestamp: we might be able to get some metadata like the creation time, but that would only be an approximation. We cannot retrieve the exact timestamp representing the point up to which the snapshot contains data.
If I understand the snapshot process correctly:
* A timestamp could be captured either before or after the flush.
* The memstore is flushed to HFiles.
* References to those HFiles are then recorded in the snapshot.
Depending on when the flush occurs, the actual "point in time" the snapshot represents can vary. However, we don’t capture that specific moment anywhere, and I believe it’s not feasible to do so with the current snapshot mechanism.
> Implement "pitr" Command for Point-in-Time Recovery/Restore
> -----------------------------------------------------------
>
> Key: HBASE-29133
> URL: https://issues.apache.org/jira/browse/HBASE-29133
> Project: HBase
> Issue Type: Task
> Components: backup&restore
> Affects Versions: 2.6.0, 3.0.0-alpha-4
> Reporter: Vinayak Hegde
> Assignee: Vinayak Hegde
> Priority: Major
> Labels: pull-request-available
>
> 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>] {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{*}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)