Last active 1 month ago

Create an encrypted archive of our backup script directory

Revision 9f931bfa5dacfa97c0dd0466e261691d6f5ef96c

dump.sh Raw
1#!/usr/bin/env bash
2
3docker exec -t nightscout-db-1 mongodump --quiet --archive | zstd > nightscout_database_$(date -Is).archive.zst
4docker exec -t gitea-db-1 pg_dumpall --clean --if-exists -U gitea | zstd > gitea_database_$(date -Is).dump.zst
5docker exec -t paperless-db-1 pg_dumpall --clean --if-exists -U paperless | zstd > paperless_database_$(date -Is).dump.zst
6docker exec -t teslamate-db-1 pg_dumpall --clean --if-exists -U teslamate | zstd > teslamate_database_$(date -Is).dump.zst
7
8# ------------------------------------
9# To decompress the files use zstd -d:
10#
11# zstd -d < file.dump.zst > file.dump
12# ------------------------------------
zip.sh Raw
1#!/usr/bin/env sh
2
3sudo echo "sudo priveliges granted"
4sudo tar -I "zstd -9" -c -C /opt/backup . | age -p > backup_tasks_$(date -Is).tzst.age
5
6# Then use https://github.com/schollz/croc to send file to target machine.