mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 00:50:51 +00:00
Including systemd services to backup VPS
This commit is contained in:
parent
17944a0867
commit
f6246fb6a9
5
Services/backup-contabo-db.service
Normal file
5
Services/backup-contabo-db.service
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=Backup contabo db daily
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/bruno/Backups/Contabo/backup-db.sh
|
10
Services/backup-contabo-db.timer
Normal file
10
Services/backup-contabo-db.timer
Normal 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
|
5
Services/backup-contabo-files.service
Normal file
5
Services/backup-contabo-files.service
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=Backup contabo files once per week
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/bruno/Backups/Contabo/backup-files.sh
|
10
Services/backup-contabo-files.timer
Normal file
10
Services/backup-contabo-files.timer
Normal 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
2
Services/logError.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo /bin/systemctl status --full "$1" >> /home/bruno/.log_error
|
6
Services/logErrors@.service
Normal file
6
Services/logErrors@.service
Normal 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
|
Loading…
Reference in New Issue
Block a user