2022-12-23 17:23:41 +02:00
2022-12-17 23:24:40 +02:00
2022-12-23 17:12:57 +02:00
2022-12-23 17:23:41 +02:00

Backup

  1. Asks the LUKS password from password API external server
  2. Backup data from local disk to encrypted USB disk
  3. Send details email

Install

git clone https://git.vaidis.eu/stevaidis/Backup.git clone /opt

Test

/opt/backup.sh --src=/mnt/data --dst=/backup

Crontab

0 1 * * * /opt/backup.sh --src=/mnt/data --dst=/backup
0 2 * * * /op./backup.sh --src=/mnt/vmachines/storage --dst=/backup/data/VMachines
0 3 * * * /op./backup.sh --src=/mnt/projects --dst=/backup --delete=yes

Password API

A Raspberry PI connected to local network can do the job of serving the password

# copy the files
cp password.py /opt/
cp password.service /etc/systemd/system/
chmod +x /opt/password.py
chmod +x /etc/systemd/system/password.service

# Install the depentencies
apt update
apt install python3-pip
pip install aiohttp

# Restart systemd daemon
systemctl daemon-reload && systemctl status password
systemctl start password && systemctl enable password

Test the service

curl http://192.168.1.199:9999/andthepasswordis
Description
No description provided
Readme 457 KiB
Languages
Shell 97.6%
Python 2.4%