mirror of
https://github.com/edu4rdshl/rusnapshot.git
synced 2026-07-17 23:24:55 +00:00
(feat): update examples.
This commit is contained in:
parent
8f67b4d044
commit
b47ebd7616
8 changed files with 32 additions and 35 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
9
examples/services/rusnapshot-daily.timer
Normal file
9
examples/services/rusnapshot-daily.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Take snapshots daily.
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
|
@ -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
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[Unit]
|
||||
Description=Take snapshots every 3 hours.
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1h
|
||||
OnUnitActiveSec=3h
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue