Add a daily dump of the Library database
library-dump.timer writes Library-<weekday>.sql.gz to ~/.local/share/library_manager/dumps, which simple_backup then copies; the login comes from ~/.config/library_manager/dump.cnf (not tracked).
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Dump the Library database to ~/.local/share/library_manager/dumps
|
||||
StartLimitIntervalSec=2h
|
||||
StartLimitBurst=4
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/library-dump
|
||||
# MariaDB not up yet (e.g. caught up right after boot)? retry a few times
|
||||
Restart=on-failure
|
||||
RestartSec=5min
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Dump the Library database daily
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user