fix(scripts): migrate to rclone from aws-cli and add cleanup actions
This commit is contained in:
10
README.md
10
README.md
@@ -267,7 +267,7 @@ Install backup upload prerequisites:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install -y awscli openssl
|
||||
sudo apt install -y rclone openssl
|
||||
```
|
||||
|
||||
Configure encrypted S3-compatible backup uploads in `./.env`:
|
||||
@@ -275,21 +275,23 @@ Configure encrypted S3-compatible backup uploads in `./.env`:
|
||||
```bash
|
||||
S3_BACKUP_BUCKET=qlockify-backups
|
||||
S3_BACKUP_PREFIX=qlockify
|
||||
S3_BACKUP_REGION=us-east-1
|
||||
S3_BACKUP_ENDPOINT_URL=https://c284984.parspack.net
|
||||
S3_BACKUP_ACCESS_KEY_ID=
|
||||
S3_BACKUP_SECRET_ACCESS_KEY=
|
||||
BACKUP_ENCRYPTION_PASSPHRASE=
|
||||
BACKUP_LOCAL_KEEP_LATEST=1
|
||||
BACKUP_LOCAL_KEEP_LATEST=3
|
||||
BACKUP_REMOTE_KEEP_LATEST=7
|
||||
```
|
||||
|
||||
Upload an encrypted backup to S3:
|
||||
Upload an encrypted backup to S3-compatible object storage with rclone:
|
||||
|
||||
```bash
|
||||
chmod +x ./scripts/backup-upload-s3.sh
|
||||
./scripts/backup-upload-s3.sh
|
||||
```
|
||||
|
||||
After a successful upload, the remote storage keeps only the latest `BACKUP_REMOTE_KEEP_LATEST` encrypted `.tar.gz.enc` files. The server keeps only the latest `BACKUP_LOCAL_KEEP_LATEST` plaintext `.tar.gz` files under `./backups/latest/`; encrypted backup files are not kept locally.
|
||||
|
||||
Restore the latest encrypted backup from S3:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user