Add rusnapshot configs.

Signed-off-by: Edu4rdSHL <edu4rdshl@protonmail.com>
This commit is contained in:
Edu4rdSHL 2022-01-30 22:12:21 -05:00
parent 58f58aca9e
commit 8acc4a6bff
No known key found for this signature in database
GPG key ID: 3A574A4009F553E5
9 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,5 @@
dest_dir = "/mnt/defvol/_snapshots/"
source_dir = "/var/lib/machines/"
database_file = "/mnt/defvol/_snapshots/rustnapshot.sqlite"
snapshot_prefix = "containers"
keep_only = "1"

View file

@ -0,0 +1,5 @@
dest_dir = "/mnt/defvol/_snapshots/"
source_dir = "/home/"
database_file = "/mnt/defvol/_snapshots/rustnapshot.sqlite"
snapshot_prefix = "home"
keep_only = "1"

View file

@ -0,0 +1,5 @@
dest_dir = "/mnt/defvol/_snapshots/"
source_dir = "/"
database_file = "/mnt/defvol/_snapshots/rustnapshot.sqlite"
snapshot_prefix = "root"
keep_only = "1"

View file

@ -0,0 +1,11 @@
[Unit]
Description=Snapshot root and home directories.
[Service]
Type=oneshot
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind daily
ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind daily
# ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-containers.toml --cr --clean --kind daily
[Install]
WantedBy=default.target

View file

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

View file

@ -0,0 +1,12 @@
[Unit]
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
[Install]
WantedBy=default.target

View file

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

View file

@ -0,0 +1,12 @@
[Unit]
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
[Install]
WantedBy=default.target

View file

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