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

Alternator: support backup and restore #5063

Open
nyh opened this issue Sep 19, 2019 · 0 comments
Open

Alternator: support backup and restore #5063

nyh opened this issue Sep 19, 2019 · 0 comments
Labels
area/alternator Alternator related Issues enhancement
Milestone

Comments

@nyh
Copy link
Contributor

nyh commented Sep 19, 2019

DynamoDB has two backup features: There's an on-demand backup and restore feature (the user says when to do a backup, and can later restore to that point), and a continuous backup feature, allowing a user to restore the data as it was any time in (near) history.

The API requests we need to implement: For on-demand backup: CreateBackup, DescribeBackup, DeleteBackup, ListBackups, RestoreTableFromBackup; For continuous backup: UpdateContinuousBackups, DescribeContinuousBackups, RestoreTableToPointInTime.

Confusingly, DynamoDB documentation uses the terms "Continuous Backups" and "Point-in-Time Recovery" (PITR) almost interchangeably, but the API (UpdateContinuousBackups, DescribeContinuousBackups) has a separate flag called ContinuousBackupsStatus which is always on and cannot be turned off (so isn't interesting...), and PointInTimeRecoveryStatus is the real flag of whether point-in-time recovery is enabled for this table.

See my discussion of these topics in the relevant sections of https://docs.google.com/document/d/1i4yjF5OSAazAY_-T8CBce9-2ykW4twx_E_Nt2zDoOVs/edit.

In November 2021, DynamoDB also announced a third way of doing DynamoDB backups dubbed AWS Backup (see documentation here). On-demand backups stored in AWS Backup also have an option of being "cold backups" - cold backups are 3 times cheaper to store and 30% more expensive to restore (at the point of this writing, restoring a regular backup costs as much as storing it for 1.5 months, but restoring a cold backup costs as much as storing it for 6.6 months).

When we are ready to implement this feature, we should add here more implementation ideas, and possibly split this issue to several issues. In particular it will be easier for us to implement on-demand backup first - using Scylla's existing snapshot feature - and leave the continuous backup feature as an open issue for later.

In July 2022, DynamoDB published a paper in Usenix ATC. Among other things, the paper suggests how they implementated these of backup features by saving "log files" (what Scylla calls commit logs) to s3, and also periodically creating from them "snapshots" at particular times.

@nyh nyh added the area/alternator Alternator related Issues label Sep 19, 2019
@slivne slivne added this to the 3.x milestone Sep 22, 2019
nyh added a commit to nyh/scylla that referenced this issue May 26, 2022
Although we don't yet support the DynamoDB API's backup features (see
issue scylladb#5063), we can already implement the DescribeContinuousBackups
operation. It should just say that continuous backups, and point-in-time
restores, and disabled.

This will be useful for client code which tries to inquire about
continuous backups, even if not planning to use them in practice
(e.g., see issue scylladb#10660).

Refs scylladb#5063
Refs scylladb#10660

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
mikolajsieluzycki pushed a commit to mikolajsieluzycki/scylla that referenced this issue May 30, 2022
Although we don't yet support the DynamoDB API's backup features (see
issue scylladb#5063), we can already implement the DescribeContinuousBackups
operation. It should just say that continuous backups, and point-in-time
restores, and disabled.

This will be useful for client code which tries to inquire about
continuous backups, even if not planning to use them in practice
(e.g., see issue scylladb#10660).

Refs scylladb#5063
Refs scylladb#10660

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alternator Alternator related Issues enhancement
Projects
None yet
Development

No branches or pull requests

3 participants