Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support point in time restore in YugabyteDB #1820

Closed
shamil opened this issue Jul 16, 2019 · 2 comments
Closed

Support point in time restore in YugabyteDB #1820

shamil opened this issue Jul 16, 2019 · 2 comments
Assignees
Labels
area/docdb YugabyteDB core features community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature kind/question This is a question priority/medium Medium priority issue roadmap-tracking-issue This issue tracks a major roadmap item, and usually appears in the roadmap list.

Comments

@shamil
Copy link

shamil commented Jul 16, 2019

Jira Link: DB-4724
The ask is to perform incremental backups and point in time restores in YSQL, similar to what PostgreSQL does:

At all times, PostgreSQL maintains a write ahead log (WAL) in the pg_wal/ subdirectory of the cluster's data directory. The log records every change made to the database's data files. This log exists primarily for crash-safety purposes: if the system crashes, the database can be restored to consistency by “replaying” the log entries made since the last checkpoint. However, the existence of the log makes it possible to use a third strategy for backing up databases: we can combine a file-system-level backup with backup of the WAL files. If recovery is needed, we restore the file system backup and then replay from the backed-up WAL files to bring the system to a current state. This approach is more complex to administer than either of the previous approaches, but it has some significant benefits:

  • We do not need a perfectly consistent file system backup as the starting point. Any internal inconsistency in the backup will be corrected by log replay (this is not significantly different from what happens during crash recovery). So we do not need a file system snapshot capability, just tar or a similar archiving tool.
  • Since we can combine an indefinitely long sequence of WAL files for replay, continuous backup can be achieved simply by continuing to archive the WAL files. This is particularly valuable for large databases, where it might not be convenient to take a full backup frequently.
  • It is not necessary to replay the WAL entries all the way to the end. We could stop the replay at any point and have a consistent snapshot of the database as it was at that time. Thus, this technique supports point-in-time recovery: it is possible to restore the database to its state at any time since your base backup was taken.
  • If we continuously feed the series of WAL files to another machine that has been loaded with the same base backup file, we have a warm standby system: at any point we can bring up the second machine and it will have a nearly-current copy of the database.

Analytics

@ttyusupov ttyusupov added community/request Issues created by external users kind/question This is a question labels Jul 16, 2019
@kmuthukk kmuthukk self-assigned this Jul 17, 2019
@kmuthukk kmuthukk changed the title Does YugaByte supports PITR? Does YugaByte support PITR? Jul 18, 2019
@kmuthukk
Copy link
Collaborator

hi @shamil

At present YB supports full-backups.

Incremental backups and the ability to restore to an arbitrary point-in-time (not just the time of the backup) have not yet been implemented. This is something we'll likely look at around Q4 of this year.

regards,
Kannan

@ttyusupov ttyusupov added the kind/enhancement This is an enhancement of an existing feature label Jul 18, 2019
@jk-1
Copy link

jk-1 commented Jan 4, 2020

PostgreSQL Incremental Backup and Point-In-Time Recovery:

https://pgdash.io/blog/postgres-incremental-backup-recovery.html

This would be very valuable feature.

@rkarthik007 rkarthik007 changed the title Does YugaByte support PITR? Support point in time restore in YugabyteDB May 4, 2020
@rkarthik007 rkarthik007 added the roadmap-tracking-issue This issue tracks a major roadmap item, and usually appears in the roadmap list. label Jul 24, 2020
@rthallamko3 rthallamko3 added the area/docdb YugabyteDB core features label Dec 29, 2022
@yugabyte-ci yugabyte-ci added priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage labels Dec 29, 2022
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature kind/question This is a question priority/medium Medium priority issue roadmap-tracking-issue This issue tracks a major roadmap item, and usually appears in the roadmap list.
Projects
None yet
Development

No branches or pull requests

7 participants