Moved to https://github.com/rharkor/sermin
Welcome to sss-backup
, your go-to tool for automated file backup to an S3 bucket! π¦
π Note: This tool is optimized for Unix systems and hasn't been tested on Windows.
Keep your backups secure with GPG encryption. Here's how to set it up:
-
Generate a Key Pair:
gpg --full-generate-key
-
List Your Keys:
gpg --list-secret-keys --keyid-format LONG
Look for the line starting with
sec
to find your KeyID. -
Export Your Public Key:
gpg --armor --export <key-id>
You can save this to a file or share it directly.
-
Import Someone Else's Public Key (not required in backup process):
gpg --import /path/to/recipientkey.asc
Optionally, fully trust the imported key if you're confident in its authenticity:
gpg --edit-key <RecipientKeyID>
In GPG console, type
trust
, select trust level, and thenquit
.
-
Set Up:
wget -q https://raw.githubusercontent.com/rharkor/sss-backup/main/docker-compose.yml -O docker-compose.yml && wget -q https://raw.githubusercontent.com/rharkor/sss-backup/main/.env.example -O .env && wget -q https://raw.githubusercontent.com/rharkor/sss-backup/main/bkp-config.json -O bkp-config.json
Modify
.env
andbkp-config.json
as needed. -
Run the Container:
π With Cron:
docker compose pull docker compose up -d
π One Time:
docker pull rg.fr-par.scw.cloud/sss-backup/sss-backup:latest docker run --rm -v $(pwd)/bkp-config.json:/usr/src/app/bkp-config.json:ro -v $(pwd)/.env:/usr/src/app/.env:ro -v /:/backup:ro -v $(pwd)/.tmp:/usr/src/app/.tmp:rw -it -e HOST_ROOT='/backup' --env-file .env rg.fr-par.scw.cloud/sss-backup/sss-backup:latest
- First download the backup from your S3 bucket.
- Decrypt
gpg --output backup.tar.gz --decrypt backup.tar.gz.gpg
- Extract
tar -xvzf backup.tar.gz
π¨βπ» To Contribute:
-
Install Dependencies:
npm install
-
Run Locally:
npm run index.ts
-
Build and Push Docker Image:
docker build -t rg.fr-par.scw.cloud/sss-backup/sss-backup:latest . docker push rg.fr-par.scw.cloud/sss-backup/sss-backup:latest
Happy backing up with sss-backup
! πΎ π
This error occurs in the uploading step on large files:
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at **node_internal_captureLargerStackTrace (node:internal/errors:563:5)
at **node_internal_errnoException (node:internal/errors:690:12)
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on TLSSocket instance at:
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v20.11.0
No solution found yet