services:
backup:
image: internetson/backup
volumes:
- ./config.yaml:/app/config.yaml
- ./logs:/app/logs
- ./temp:/app/temp # Optional: persist temp files
restart: unless-stopped
environment:
- TZ=Europe/Paris # Set timezone if needed
# Test archive & upload, help:
./backup -test server_name
./backup -help
# Decrypt:
decrypt -i <input> -o <output> -p <password>
decrypt -i <input.part001> -o <output> -p <password> -j
decrypt <input> <output> <password> (legacy)
docker run --rm -v ./data:/data backup:latest /app/decrypt -i /data/file.enc -o /data/file.tar.gz -p password -j
# config.yaml.example
telegram:
token: "YOUR_TELEGRAM_BOT_TOKEN"
chat_id: "YOUR_CHAT_ID"
api_url: "https://api.telegram.org/" # Optional: custom Telegram API URL
timeout: 600 # Timeout in seconds for file uploads (default 600)
delay_between_sends: 5
media_group_size: 1
encryption:
password: "YOUR_ENCRYPTION_PASSWORD" # Strong password for AES-256 CBC
servers:
- name: "server1"
host: "192.168.1.100"
user: "backup_user"
auth_type: "key" # or "password"
key_path: "/path/to/private/key" # if auth_type is key
password: "" # if auth_type is password
# source_path: "/home/user/data" # not needed if using includes
tmp_dir: "/mnt/raid/_tmp" # remote tmp
backup_name: "server1_backup"
date_format: "%Y-%m-%d_%H-%M-%S"
schedule:
cron: "0 2 * * *" # Cron expression: minute hour day month day_of_week
size_limit_mb: 1990
excludes:
- "*.log"
- "temp/"
- "cache/"
includes:
- "/home/user/data/important/"
- "/home/user/data/config.json"
caption: "server1 backup" # Optional caption for Telegram message
mysql:
enabled: true # Enable MySQL backup
host: "localhost"
user: "root"
password: "mysql_password"
port: 3306
Content type
Image
Digest
sha256:2596f4377…
Size
10.2 MB
Last updated
9 months ago
docker pull internetson/backup