From 7054dc69613f47d2b68dbca06f4895fe52412f7c Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 20 Mar 2015 01:07:55 +0100 Subject: backup-mariadb: Adding first version of backup-mariadb script, service and timer. --- system/backup-mariadb.service | 12 ++++++++++++ system/backup-mariadb.timer | 10 ++++++++++ 2 files changed, 22 insertions(+) create mode 100644 system/backup-mariadb.service create mode 100644 system/backup-mariadb.timer (limited to 'system') diff --git a/system/backup-mariadb.service b/system/backup-mariadb.service new file mode 100644 index 0000000..8aa6622 --- /dev/null +++ b/system/backup-mariadb.service @@ -0,0 +1,12 @@ +[Unit] +Description=Backup MariaDB databases +ConditionFileIsExecutable=/usr/lib/systemd/scripts/backup-mariadb +ConditionFileIsExecutable=/usr/bin/mysql + +[Service] +EnvironmentFile=/etc/backup-settings +Nice=19 +IOSchedulingClass=2 +IOSchedulingPriority=7 +ExecStart=/usr/lib/systemd/scripts/backup-mariadb + diff --git a/system/backup-mariadb.timer b/system/backup-mariadb.timer new file mode 100644 index 0000000..1f9fca6 --- /dev/null +++ b/system/backup-mariadb.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Backup MariaDB databases every Monday at 3:00 + +[Timer] +# Every Monday at 3:00 +OnCalendar=Mon *-*-* 03:00 +Persistent=true + +[Install] +WantedBy=timers.target -- cgit v1.2.3-70-g09d2