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

implement restore for incremental backup #634

Open
wants to merge 3 commits into
base: qh/backup-descriptor
Choose a base branch
from

Conversation

qiyanghe1998
Copy link
Contributor

This diff adds the restore for incremental backup, in order not to change the api name, I use a flag in restoreDBFromS3 in admin_handler to distinguish from the previous restore.

It will first check the latest timestamp for the db from the restore request, and download all the files from the latest backup.
Then, it will download all the missing files from previous backup corresponding to the map in backup descriptor. Finally, add the db.

There is one problem about lock. For example, if someone is removing the db and it is incrementally backuping the db, it will cause some problem. I did not find a good way to share a lock between db_manager and the backup_manager. Furthermore, it is better to have a fine-grained lock for each db. Otherwise, the system will be inefficient (every operation will acquire the only one lock).

@qiyanghe1998 qiyanghe1998 changed the base branch from master to qh/backup-descriptor August 10, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant