feat: Adds systemd service and timer.
This commit is contained in:
12
README.md
12
README.md
@@ -1,3 +1,13 @@
|
|||||||
# backup
|
# backup
|
||||||
|
|
||||||
A script template to backup docker volumes on the servers.
|
A script template to backup docker volumes on the servers.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Download the script `wget https://git.housh.dev/homelab/backup/raw/branch/main/docker-backup.sh`
|
||||||
|
1. Edit the script to include services that need to be shut down, prior to
|
||||||
|
backup.
|
||||||
|
1. Add any extra volumes to backup.
|
||||||
|
1. Make script executable `chmod +x docker-backup.sh`
|
||||||
|
1. Run the script `sudo ./docker-backup.sh`
|
||||||
|
|
||||||
|
|||||||
9
backup.service
Normal file
9
backup.service
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Docker backup service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/bin/bash -c '/home/michael/docker-backup.sh'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
8
backup.timer
Normal file
8
backup.timer
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Daily Backup Timer
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 03:00:00
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Reference in New Issue
Block a user