Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.66 KB

SETUP_AND_USAGE.md

File metadata and controls

43 lines (25 loc) · 1.66 KB

Dependencies

Installation

  • Install Rust.
  • Clone the repo.
  • Run cargo build --release
  • cp target/release/rusnapshot /usr/bin/

Usage

sudo rusnapshot --config {{path/to/config.toml}} --create

  • List created snapshots:

sudo rusnapshot -c {{path/to/config.toml}} --list

  • Delete a snapshot by ID or the name of the snapshot:

sudo rusnapshot -c {{path/to/config.toml}} --del --id {{snapshot_id}}

  • Delete all hourly snapshots:

sudo rusnapshot -c {{path/to/config.toml}} --list --keep {{0}} --clean --kind {{hourly}}

  • Create a read-write snapshot:

sudo rusnapshot -c {{path/to/config.toml}} --create --rw

  • Restore a snapshot:

sudo rusnapshot --id {{snapshot_id}} --restore

Notes

  • You can use system variables to work with rusnapshot, the variables needs to be set with the RUSNAPSHOT_ prefix followed by oned of the strings avilable in the config example, for example RUSNAPSHOT_DATABASE_FILE=/path/to/database.sqlite
  • The --kind option can have any value and allow you to have different "kinds" of snapshots for the same directory, see the services/timers examples for more info.
  • The --prefix option is used to declare the first part of the snapshot name.