Skip to content

Commit 4a23367

Browse files
authored
update
1 parent f5a5c42 commit 4a23367

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

borgmatic/borgmatic-backup.service

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Daily Borgmatic backup for all sites
3+
After=network.target
4+
5+
[Service]
6+
Type=oneshot
7+
ExecStart=/usr/bin/bash -c "HOSTNAME=$(hostname) /usr/bin/docker compose -f /opt/borgmatic/docker-compose.yml run --rm --entrypoint 'borgmatic --stats -v 0' borgmatic"
8+
StandardOutput=append:/opt/borgmatic/cron.log
9+
StandardError=append:/opt/borgmatic/cron.log

borgmatic/borgmatic-backup.timer

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Run Borgmatic backup service daily at 3am
3+
4+
[Timer]
5+
OnCalendar=*-*-* 03:00:00
6+
AccuracySec=1h
7+
Persistent=true
8+
9+
[Install]
10+
WantedBy=timers.target

0 commit comments

Comments
 (0)