(feat): update examples.

This commit is contained in:
Eduard Tolosa 2025-05-04 01:41:49 -05:00
parent 8f67b4d044
commit b47ebd7616
8 changed files with 32 additions and 35 deletions

View file

@ -2,16 +2,16 @@
# These are all the current available options
# Snapshots directory
dest_dir = "/.rusnapshot"
dest_dir = "/.snapshots"
# Directory to be snapshot-ed
source_dir = "/"
# SQLite database file PATH where snapshots metadata will be stored. Created if not exists
database_file = "/.rusnapshot/rusnapshot.db"
database_file = "/.snapshots/rusnapshot.db"
# Prefix for the snapshots, they will be saved in the format prefix-$current_date
snapshot_prefix = "root"
# Snapshots identifier
snapshot_kind = "weekly"
# Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted
keep_only = 2
keep_only = 3
# Machine name to be used in the snapshots metadata
machine = "Oribos"

View file

@ -1,12 +1,12 @@
# Snapshots directory
dest_dir = "/.rusnapshot"
dest_dir = "/.snapshots"
# Directory to be snapshot-ed
source_dir = "/home"
# SQLite database file PATH where snapshots metadata will be stored. Created if not exists
database_file = "/.rusnapshot/rusnapshot.db"
database_file = "/.snapshots/rusnapshot.db"
# Prefix for the snapshots, they will be saved in the format prefix-$current_date
snapshot_prefix = "home"
# Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted
keep_only = 2
keep_only = 3
# Machine name to be used in the snapshots metadata
machine = "Oribos"
machine = "Oribos"

View file

@ -1,12 +1,12 @@
# Snapshots directory
dest_dir = "/.rusnapshot"
dest_dir = "/.snapshots"
# Directory to be snapshot-ed
source_dir = "/"
# SQLite database file PATH where snapshots metadata will be stored. Created if not exists
database_file = "/.rusnapshot/rusnapshot.db"
database_file = "/.snapshots/rusnapshot.db"
# Prefix for the snapshots, they will be saved in the format prefix-$current_date
snapshot_prefix = "root"
# Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted
keep_only = 2
keep_only = 3
# Machine name to be used in the snapshots metadata
machine = "Oribos"
machine = "Oribos"

View file

@ -3,10 +3,7 @@ Description=Snapshot root directory.
[Service]
Type=oneshot
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours --rw
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours --rw
[Install]
WantedBy=default.target
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind daily
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind daily
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind daily
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind daily

View file

@ -0,0 +1,9 @@
[Unit]
Description=Take snapshots daily.
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -3,10 +3,10 @@ Description=Take system snapshots monthly.
[Service]
Type=oneshot
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly --rw
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly --rw
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind monthly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind monthly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind monthly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind monthly
[Install]
WantedBy=default.target

View file

@ -1,9 +0,0 @@
[Unit]
Description=Take snapshots every 3 hours.
[Timer]
OnBootSec=1h
OnUnitActiveSec=3h
[Install]
WantedBy=timers.target

View file

@ -3,10 +3,10 @@ Description=Take system snapshots weekly.
[Service]
Type=oneshot
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly --rw
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly --rw
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind weekly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind weekly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind weekly
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind weekly
[Install]
WantedBy=default.target