Including systemd services to backup VPS

This commit is contained in:
Bruno F. Fontes 2019-06-10 12:29:06 -03:00
parent 17944a0867
commit f6246fb6a9
Signed by: brunofontes
GPG Key ID: EE3447CE80048495
6 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,5 @@
[Unit]
Description=Backup contabo db daily
[Service]
ExecStart=/home/bruno/Backups/Contabo/backup-db.sh

View File

@ -0,0 +1,10 @@
[Unit]
Description=Backup contabo db dayly
[Timer]
#DayOfWeek Year-Month-Day Hour:Minute:Second
OnCalendar=*-*-* 10:00:00
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,5 @@
[Unit]
Description=Backup contabo files once per week
[Service]
ExecStart=/home/bruno/Backups/Contabo/backup-files.sh

View File

@ -0,0 +1,10 @@
[Unit]
Description=Backup contabo files once per week
[Timer]
#DayOfWeek Year-Month-Day Hour:Minute:Second
OnCalendar=Mon *-*-* 11:00:00
Persistent=true
[Install]
WantedBy=timers.target

2
Services/logError.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo /bin/systemctl status --full "$1" >> /home/bruno/.log_error

View File

@ -0,0 +1,6 @@
[Unit]
Description=Log Systemd errors on my %i script on home
[Service]
ExecStart=/home/bruno/Apps/linuxShortcuts/Services/logError.sh %i
#ExecStart=/bin/systemctl status --full %i >> /home/bruno/.log_error