docs(deployment): update backup docs with R2 completion, pip3 install, systemd PATH
Some checks failed
Some checks failed
- Mark Steps 1-18 as fully complete (R2 offsite backups operational) - Fix awscli install instructions: pip3 instead of apt (Ubuntu 24.04) - Add Environment PATH to systemd service for ~/.local/bin/aws - Add --upload flag to systemd ExecStart now that R2 is configured Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,11 +84,11 @@ Complete step-by-step guide for deploying Orion on a Hetzner Cloud VPS.
|
|||||||
- `https://rewardflow.lu` (Loyalty+)
|
- `https://rewardflow.lu` (Loyalty+)
|
||||||
- Platform `domain` column updated in production DB
|
- Platform `domain` column updated in production DB
|
||||||
- RAM usage ~2.4 GB on 4 GB server (stable, CI jobs add ~550 MB temporarily)
|
- RAM usage ~2.4 GB on 4 GB server (stable, CI jobs add ~550 MB temporarily)
|
||||||
|
- **Systemd backup timer** (`orion-backup.timer`) — daily at 03:00 UTC, tested manually
|
||||||
|
- **Cloudflare R2 offsite backups** — `orion-backups` bucket, `awscli` configured with `--profile r2`, `--upload` flag added to systemd timer
|
||||||
|
- `python3-pip` and `awscli` installed on server (pip user install, PATH added to `.bashrc` and systemd service)
|
||||||
|
|
||||||
**Remaining:**
|
**Steps 1–18 fully complete.** All infrastructure operational.
|
||||||
|
|
||||||
- [ ] Cloudflare R2 offsite backup setup (create account + bucket, configure `awscli`, add `--upload` to systemd timer)
|
|
||||||
- [ ] Systemd backup timer (`orion-backup.timer`) — daily at 03:00
|
|
||||||
|
|
||||||
|
|
||||||
## Installed Software Versions
|
## Installed Software Versions
|
||||||
@@ -835,7 +835,14 @@ R2 provides S3-compatible object storage with a generous free tier (10 GB storag
|
|||||||
**Install and configure AWS CLI on the server:**
|
**Install and configure AWS CLI on the server:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install -y awscli
|
# awscli is not available via apt on Ubuntu 24.04; install via pip
|
||||||
|
sudo apt install -y python3-pip
|
||||||
|
pip3 install awscli --break-system-packages
|
||||||
|
|
||||||
|
# Add ~/.local/bin to PATH (pip installs binaries there)
|
||||||
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
aws configure --profile r2
|
aws configure --profile r2
|
||||||
# Access Key ID: <from step 5>
|
# Access Key ID: <from step 5>
|
||||||
# Secret Access Key: <from step 5>
|
# Secret Access Key: <from step 5>
|
||||||
@@ -896,7 +903,8 @@ After=docker.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
User=samir
|
User=samir
|
||||||
ExecStart=/usr/bin/bash /home/samir/apps/orion/scripts/backup.sh
|
Environment="PATH=/home/samir/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
ExecStart=/usr/bin/bash /home/samir/apps/orion/scripts/backup.sh --upload
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
StandardError=journal
|
StandardError=journal
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user