Skip to content

implement restore for incremental backup#634

Open
qiyanghe1998 wants to merge 3 commits intoqh/backup-descriptorfrom
qh/incr-backup-restore
Open

implement restore for incremental backup#634
qiyanghe1998 wants to merge 3 commits intoqh/backup-descriptorfrom
qh/incr-backup-restore

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 requested a review from mradwan August 10, 2022 22:49
@qiyanghe1998 qiyanghe1998 force-pushed the qh/incr-backup-restore branch from 85769e5 to ca898e1 Compare August 10, 2022 22:54
@qiyanghe1998 qiyanghe1998 changed the base branch from master to qh/backup-descriptor August 10, 2022 22:58
@qiyanghe1998 qiyanghe1998 force-pushed the qh/incr-backup-restore branch from 051bb95 to 95e4d4e Compare August 12, 2022 06:46
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.

1 participant