kvrocks
kvrocks copied to clipboard
Add BACKUP new command with options
Search before asking
- [X] I had searched in the issues and found no similar issues.
Motivation
At now we have only BGSAVE command (for compatibility with original Redis semantic), and need a separate SET config options for backup_path. And, as I see, not supporting sync/async mode of backup.
Solution
Command BGSAVE hasn't clear semantic, so I propose a new command: BACKUP <backup_path> SYNC|ASYNC
- <backup_path> are optional path to store current backup (e.g. /tmp/backup etc.) If backup are exists, it will be destroy before perform a new.
- SYNC|ASYNC is an option flag (default are ASYNC) for creating backup using sync/async method (see BackupableDBOptions::sync
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
A some internal discussion are here - https://github.com/apache/incubator-kvrocks/discussions/483
Hi @aleksraiden
I think it's a good proposal, I even think if possible to backup and restore from the remote storage directly. https://github.com/orgs/apache/projects/199?pane=issue&itemId=23218575