Compare commits

..

No commits in common. "bafd045a5f0217b5624e450b810263121845bb4c" and "fb982cd6462d027c6ab5a28ef0a3091c460031e5" have entirely different histories.

3 changed files with 0 additions and 17 deletions

View File

@ -2,10 +2,6 @@
. /etc/backup.conf
if [ -n "$HEALTHCHECK_URL" ]; then
curl -L "{$HEALTHCHECK_URL}/start"
fi
# some helpers and error handling:
info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
@ -67,8 +63,4 @@ else
info "Backup, Prune, and/or Compact finished with errors"
fi
if [ -n "$HEALTHCHECK_URL" ]; then
curl -L "{$HEALTHCHECK_URL}/{$global_exit}"
fi
exit ${global_exit}

View File

@ -19,12 +19,9 @@ assert getpass.getpass("Confirm passhphrase: ").rstrip() == secret_seed, "Passph
salted_secret_seed = hostname + secret_seed
salted_hash_value = hashlib.sha512(salted_secret_seed.encode())
healthcheck_url = input("Enter healthcheck url: ").rstrip()
with open("/etc/backup.conf", "w") as f:
f.write(f"export BORG_REPO='ssh://{hostname}@{server_hostname}.162536.xyz:22/~/backup/docker'\n")
f.write(f"export BORG_PASSPHRASE='{salted_hash_value.hexdigest()}'\n")
f.write(f"export HEALTHCHECK_URL='{healthcheck_url}'\n")
os.system("ssh-keygen -t rsa -q -f \"$HOME/.ssh/id_rsa\" -N \"\"")

View File

@ -1,6 +0,0 @@
# Backups
Example cron:
```sh
32 * * * * /bin/sh /root/standard-build/backup/backup-script.sh >/root/last-backup-log.txt 2>&1
```