Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Add example unit files
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Jun 3, 2019
1 parent b01d592 commit 45053be
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 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
8 changes: 8 additions & 0 deletions 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
12 changes: 12 additions & 0 deletions 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
8 changes: 8 additions & 0 deletions systemd/backup_postgresql.timer
@@ -0,0 +1,8 @@
[Unit]
Description=Run backups on PostgreSQL databases

[Timer]
OnCalendar=*-*-* 4:00:00

[Install]
WantedBy=timers.target

0 comments on commit 45053be

Please sign in to comment.