mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
Add rusnapshot configs.
Signed-off-by: Edu4rdSHL <edu4rdshl@protonmail.com>
This commit is contained in:
parent
58f58aca9e
commit
8acc4a6bff
9 changed files with 77 additions and 0 deletions
5
etc/rusnapshot/config-containers.toml
Normal file
5
etc/rusnapshot/config-containers.toml
Normal 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"
|
||||||
5
etc/rusnapshot/config-home.toml
Normal file
5
etc/rusnapshot/config-home.toml
Normal 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"
|
||||||
5
etc/rusnapshot/config-root.toml
Normal file
5
etc/rusnapshot/config-root.toml
Normal 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"
|
||||||
11
etc/systemd/system/rusnapshot-daily.service
Normal file
11
etc/systemd/system/rusnapshot-daily.service
Normal 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
|
||||||
9
etc/systemd/system/rusnapshot-daily.timer
Normal file
9
etc/systemd/system/rusnapshot-daily.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Take snapshots daily.
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
12
etc/systemd/system/rusnapshot-monthly.service
Normal file
12
etc/systemd/system/rusnapshot-monthly.service
Normal 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
|
||||||
9
etc/systemd/system/rusnapshot-monthly.timer
Normal file
9
etc/systemd/system/rusnapshot-monthly.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Take system snapshots monthly.
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=monthly
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
12
etc/systemd/system/rusnapshot-weekly.service
Normal file
12
etc/systemd/system/rusnapshot-weekly.service
Normal 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
|
||||||
9
etc/systemd/system/rusnapshot-weekly.timer
Normal file
9
etc/systemd/system/rusnapshot-weekly.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Take system snapshots weekly.
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=weekly
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Loading…
Add table
Add a link
Reference in a new issue