diff --git a/systemd/backup_configs.service b/systemd/backup_configs.service new file mode 100644 index 0000000..558213d --- /dev/null +++ b/systemd/backup_configs.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run backups on service configurations and Docker volumes + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/backup.sh -c -d +User=root +WorkingDirectory=/tmp + +[Install] +WantedBy=default.target diff --git a/systemd/backup_configs.timer b/systemd/backup_configs.timer new file mode 100644 index 0000000..2c73fd8 --- /dev/null +++ b/systemd/backup_configs.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Run backups on service configurations and Docker volumes + +[Timer] +OnCalendar=*-*-* 4:00:00 + +[Install] +WantedBy=timers.target diff --git a/systemd/backup_postgresql.service b/systemd/backup_postgresql.service new file mode 100644 index 0000000..1cc8e1d --- /dev/null +++ b/systemd/backup_postgresql.service @@ -0,0 +1,12 @@ +[Unit] +Description=Run backups on PostgreSQL databases + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/backup.sh -p +User=postgres +Group=postgres +WorkingDirectory=/tmp + +[Install] +WantedBy=default.target diff --git a/systemd/backup_postgresql.timer b/systemd/backup_postgresql.timer new file mode 100644 index 0000000..d10d67a --- /dev/null +++ b/systemd/backup_postgresql.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Run backups on PostgreSQL databases + +[Timer] +OnCalendar=*-*-* 4:00:00 + +[Install] +WantedBy=timers.target