apache / apache/kvrocks

Add BACKUP new command with options

Open
#1,344 2 comments 0 reactions 0 assignees View on GitHub
enhancement feature
Dominant language
C++
Stars
4.4k
Forks
658
Avg merge
1d 20h
Merged PRs (30d)
10

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/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 SYNC|ASYNC

- 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](https://rocksdb.org/blog/2014/03/27/how-to-backup-rocksdb.html)

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing BGSAVE command and the RocksDB BackupableDBOptions::sync behavior referenced in the issue. The work is done when BACKUP accepts an optional backup path and SYNC or ASYNC mode, defaults to ASYNC, and replaces an existing backup at that path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.