Research-Stack/4-Infrastructure/storage/restic/restic-backup.service
Brandon Schneider fd863af6fd Expand devcontainer with full Python stack, add MCP servers (Notion/AWS), strengthen Lean theorems
- .devcontainer/Dockerfile: add PostgreSQL client libs, OpenSSL/libffi headers, gfortran/BLAS for scipy, rclone; install full Python dependency set (boto3, psycopg2-binary, fastapi, uvicorn, notion-client, httpx, pytest, numpy, scipy, etc.) in uv-managed venv; add rclone S3 gateway init script as ENTRYPOINT
- .devcontainer/devcontainer.json: switch from build to pre-built image (localhost/research
2026-05-19 01:52:14 -05:00

26 lines
1,006 B
Desktop File

[Unit]
Description=Restic backup — snap + cold-copy to gdrive + sync gdrive-mirror
After=network-online.target garage.service
Wants=network-online.target
[Service]
Type=oneshot
User=allaun
EnvironmentFile=/etc/garage/garage.env
# Map GARAGE_* names to what restic/AWS SDK expect at runtime
ExecStartPre=/bin/bash -c 'echo "AWS_ACCESS_KEY_ID=$GARAGE_ACCESS_KEY_ID" > /run/user/1000/restic-aws.env'
ExecStart=/bin/bash -c '\
source /etc/garage/garage.env; \
export AWS_ACCESS_KEY_ID="$GARAGE_ACCESS_KEY_ID"; \
export AWS_SECRET_ACCESS_KEY="$GARAGE_SECRET_ACCESS_KEY"; \
export AWS_DEFAULT_REGION=garage; \
export AWS_ENDPOINT_URL=http://localhost:3900; \
export RESTIC_REPOSITORY=s3:http://localhost:3900/research-stack; \
export RESTIC_PASSWORD_FILE=/etc/garage/restic-password; \
exec /usr/local/lib/restic-backup/backup.sh full'
StandardOutput=append:/home/allaun/.cache/restic-backup.log
StandardError=append:/home/allaun/.cache/restic-backup.log
TimeoutStartSec=3h