Skip to content

Commit f5fab95

Browse files
committed
docs: provide an extra note on local backups
Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
1 parent efdc0a6 commit f5fab95

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* [6.2 Operations](#62-operations)
2828
* [6.3 Local Devnet](#63-local-devnet)
2929
* [6.4 Feature Flags](#64-feature-flags)
30+
* [6.5 Local Backups](#65-local-backups)
3031
* [7. Contributors](#7-contributors)
3132
* [8. License](#8-license)
3233

@@ -601,10 +602,12 @@ By default, the metrics feature is turned on for some internal crates.
601602
* **test_targets** -
602603
This feature allows the lowering of coinbase and proof targets for testing.
603604

604-
## 6.5 Local backups
605+
## 6.5 Local Backups
605606

606607
The snarkOS node implementation uses rocksdb under the hood. By using its native checkpointing mechanism, you can create backups locally and efficiently. The backups leverage hard links on your filesystem, thereby incurring only a marginal amount of extra space. The aim of these local backups is for you to be able to recover quickly in case your node were to halt.
607608

609+
Note: in order for the backups to be incremental and lightweight, they need to be stored at the same filesystem (this includes `btrfs` subvolumes) as the ledger; otherwise, they become full copies.
610+
608611
You can find a basic sample script in `scripts/backup.sh` which you can run as a cron-job e.g. every minute. Each run of the script creates a new backup folder with a timestamp postfix. It will ensure a backup is kept which is 1 minute old, 5 minutes old, 1 hour old and 1 day old. In more detail, on each run it will:
609612
- always overwrite the latest backup
610613
- only overwrite the 5 minute backup if it is older than 5 minutes

0 commit comments

Comments
 (0)