Split create, check and prune borgmatic systemd files
This commit is contained in:
parent
59013f4adf
commit
2bd1d69f1d
12 changed files with 102 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run borgmatic backup check for %I utilizing HOME/.config/borgmatic/%I.yml file
|
Description=Run borgmatic check for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run borgmatic check %I backup timer utilizing HOME/.config/borgmatic/%I.yml file
|
Description=Run borgmatic %I check timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=Mon,Thu 22:00:00
|
OnCalendar=Wed 21:30:00
|
||||||
Persistent=true
|
Persistent=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
15
etc/systemd/system/borgmatic-create@.service
Normal file
15
etc/systemd/system/borgmatic-create@.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic create for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
ConditionACPower=true
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=borgmatic create --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml
|
||||||
|
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
|
||||||
|
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
etc/systemd/system/borgmatic-create@.timer
Normal file
9
etc/systemd/system/borgmatic-create@.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic %I create timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 20:00:00
|
||||||
|
Persistent=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
15
etc/systemd/system/borgmatic-prune@.service
Normal file
15
etc/systemd/system/borgmatic-prune@.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic prune for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
ConditionACPower=true
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=borgmatic prune --only repository --only archives --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml
|
||||||
|
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
|
||||||
|
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
etc/systemd/system/borgmatic-prune@.timer
Normal file
9
etc/systemd/system/borgmatic-prune@.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic %I prune timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Wed 23:00:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run borgmatic backup check for %I utilizing HOME/.config/borgmatic/%I.yml file
|
Description=Run borgmatic check for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run borgmatic check %I backup timer utilizing HOME/.config/borgmatic/%I.yml file
|
Description=Run borgmatic %I check timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=Mon,Thu 22:00:00
|
OnCalendar=Wed 21:30:00
|
||||||
Persistent=true
|
Persistent=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
15
etc/systemd/user/borgmatic-create@.service
Normal file
15
etc/systemd/user/borgmatic-create@.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic create for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
ConditionACPower=true
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=borgmatic create --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml
|
||||||
|
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
|
||||||
|
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
etc/systemd/user/borgmatic-create@.timer
Normal file
9
etc/systemd/user/borgmatic-create@.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic %I create timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 20:00:00
|
||||||
|
Persistent=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
15
etc/systemd/user/borgmatic-prune@.service
Normal file
15
etc/systemd/user/borgmatic-prune@.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic prune for %I utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
ConditionACPower=true
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=borgmatic prune --only repository --only archives --syslog-verbosity 1 --config %h/.config/borgmatic/%I.yml
|
||||||
|
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:%h/.bin"
|
||||||
|
Environment="SSH_AUTH_SOCK=/run/user/%u/keyring/ssh"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
etc/systemd/user/borgmatic-prune@.timer
Normal file
9
etc/systemd/user/borgmatic-prune@.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run borgmatic %I prune timer utilizing HOME/.config/borgmatic/%I.yml file
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Wed 23:00:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue