added systemd unit file and timer.
This commit is contained in:
10
etc/systemd/system/make-backup.service
Normal file
10
etc/systemd/system/make-backup.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Making backup of NAME
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/home/user/git/disaster-recovery
|
||||
ExecStart=/home/user/git/disaster-recovery/make_backup.sh backup.env
|
||||
User=root
|
||||
StandardOutput=journal
|
||||
|
||||
9
etc/systemd/system/make-backup.timer
Normal file
9
etc/systemd/system/make-backup.timer
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Backup of NAME directory, disaster recovery
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Mon-Sun *-*-* 04:00:00
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
||||
Reference in New Issue
Block a user