Compare commits

..

No commits in common. "f98d2a1579bbe68542a3b5dccf059b9d430a728f" and "dab704a07dbf24e416f133de15071a5de9c9ef59" have entirely different histories.

3 changed files with 4 additions and 23 deletions

2
.gitignore vendored
View File

@ -161,5 +161,3 @@ cython_debug/
#.idea/ #.idea/
src/config.py src/config.py
latest-success
logs

View File

@ -1,20 +1,3 @@
# backups # backups
Auto backup script. The objectives are the following: Auto backup script
- Have a raspberry-pi `RPI` (or any other device) doing automatic backups of a remote server `SERVER` every day
- Backups are incremental, without redundancy, it is easy to get data out of a specific snapshot
- `RPI` is not vulnerable to physical access (in a reasonable way):
+ The backup disk is encrypted, but the key is not stored on `RPI`
+ The keys to access `SERVER` are locked and can be "revoked at distance"
- Conversely, if a malicious access is made to `SERVER`, backups are not compromised
- If a backup fails for any reason, a notification is sent (via Discord)
- `RPI` can be accessed remotely, without needing to expose one of its ports
## Installation
On a raspbian distribution, this requires:
- The packages `cryptsetup sshpass`
- a filesystem (in a LUKS device with `LUKS_KEY`) formatted in xfs or btrf (needs either `xfsprogs` or `btrfs-progs`)
- an ssh key locked with `SSH_PASSPHRASE` to access to the server to backup
- Two urls containing each `LUKS_KEY` or `SSH_PASSPHRASE`
- a (Discord) webhook

View File

@ -25,10 +25,10 @@ if not os.path.exists(config.DISK):
exit(1) exit(1)
passwd = requests.get(config.PWD_URL).text.strip() passwd = requests.get(config.PWD_URL).text.strip()
log("Got password") log("Got password :", passwd)
ssh_key_passwd = requests.get(config.SSH_KEY_PWD_URL).text.strip() ssh_key_passwd = requests.get(config.SSH_KEY_PWD_URL).text.strip()
log("Got ssh passphrase") log("Got password :", ssh_key_passwd)
class Drive(): class Drive():