Open cristaloleg opened 1 year ago
Some alternatives you might want to consider:
sstable.Writer
. Then, when restoring, Ingest
the sstables to link them into the LSM without needing to rewrite the keys. This is how CockroachDB's backup and restore works.DB.Checkpoint
with the WithFlushedWAL
option to create a checkpoint in another directory. The checkpoint directory is your backup and may be copied elsewhere and then removed from the local filesystem. To restore, copy the directory and all its contents into place and Open
the database.Thank you for the quick answer!
I like the 1st approach 'cause it's proven b CockroachDB.
Feel free to close the issue if it's no-op and Pebble team isn't interested in documenting this somehow.
Hi, for a long time, README has stated that backups are not supported compared to RocksDB.
How can backups be implemented on the user's side?
The most straightforward solution is to make a snapshot, iterate over the keys and save them into a separate file (whatever serialization format). To restore: open the file from the previous step, iterate over entries and do
db.Put
for every key.Is there a better approach? More correct? Ready to use?
Thanks in advance.
Jira issue: PEBBLE-72