No description
Find a file
2024-02-05 02:47:48 -05:00
.vscode Initial commit. 2021-04-15 21:12:08 -05:00
docs Update SETUP.md 2021-04-23 16:30:30 +00:00
examples Add support for TOML config files 2024-02-05 02:36:33 -05:00
src Use args.dest_dir (--to) when restoring the snapshot 2024-02-05 02:47:48 -05:00
.gitignore Initial commit. 2021-04-15 21:12:08 -05:00
builder.sh Update builder.sh 2022-03-11 15:32:33 -05:00
Cargo.lock Add support for TOML config files 2024-02-05 02:36:33 -05:00
Cargo.toml Add support for TOML config files 2024-02-05 02:36:33 -05:00
README.md Update README.md 2021-04-23 16:31:22 +00:00

Description

Simple and handy btrfs snapshoting tool. Supports unattended snapshots, tracking, restoring, automatic cleanup and more. Backed with SQLite.

Documentation

See the docs folder.

Features

  • Allows you to specify the origin and destination of snapshots at will of the user.
  • Track snapshots using SQLite as backend database.
  • Easy setup using small templates instead of confusing long files.
  • You can create snapshots of the volumes you want simply by using different configuration templates.
  • You can create read-only or read-write snapshots.
  • You can use the same SQLite database for everything.
  • You can specify the prefix of the name for the snapshots.
  • You can specify a kind identifier to differentiate them in the database. Useful if you plan to have hourly, weekly, montly or more "kind" of snapshots of the same subvolume(s).
  • Supports restoration of snapshots in the original directory or a specific one.
  • Automatic snapshots cleanup.
  • Nice CLI output to see the status and details of snapshots.

Known limitations

Due to SQLite limitations to handle concurrent database operations, we need to make use of SQLite's busy_timeout, which was initially implemented in ce44bf6. Without it you will get the error: Error: database is locked (code 5) if you try to make concurrent snapshots exactly at the same time. The default timeout is 5 seconds which is more than enough time so that no problem occurs even in the most demanding scenarios.

In summary, busy_timeout is the maximum time that SQLite will retry the failed transaction. Considering that Rusnapshot's database operations are small and shouldn't take long, 5 seconds is a decent time. If you continue to get the mentioned error, try increasing --timeout, remember that the value must be in milliseconds.

Screenshots

List snapshots

2021-04-23_11-11

Create and restore snapshot

2021-04-23_11-15

Delete snapshot

2021-04-23_11-17