Add coder_test: backup manager, data analysis, tests and systemd units
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Single incremental filesystem backup run
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=backup
|
||||
Group=backup
|
||||
WorkingDirectory=/opt/backup
|
||||
ExecStart=/usr/bin/python3 /opt/backup/backup_manager.py run --config /opt/backup/backup_config.json
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Scheduled incremental filesystem backup (backup_manager)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=backup
|
||||
Group=backup
|
||||
WorkingDirectory=/opt/backup
|
||||
ExecStart=/usr/bin/python3 /opt/backup/backup_manager.py watch --config /opt/backup/backup_config.json
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run backup_manager periodically (alternative to watch mode)
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 03:00:00
|
||||
Persistent=true
|
||||
Unit=backup-run.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user