1009 B
1009 B
Backup
- Asks the LUKS password from password API external server
- Backup data from local disk to encrypted USB disk
- 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/
# 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