Backups done right... by robots!
This is a small and simple wrapper application for Restic that provides:
Just go build and run it, or, if you're into Docker, southclaws/restic-robot.
Environment variables:
SCHEDULE: cron scheduleRESTIC_REPOSITORY: repository nameRESTIC_PASSWORD: repository passwordRESTIC_ARGS: additional args for backup commandRUN_ON_BOOT: run a backup on startupPROMETHEUS_ENDPOINT: metrics endpointPROMETHEUS_ADDRESS: metrics host:portPrometheus metrics:
backups_all_total: The total number of backups attempted, including failures.backups_successful_total: The total number of backups that succeeded.backups_failed_total: The total number of backups that failed.backup_duration_milliseconds: The duration of backups in milliseconds.backup_files_new: Amount of new files.backup_files_changed: Amount of files with changes.backup_files_unmodified: Amount of files unmodified since last backup.backup_files_processed: Total number of files scanned by the backup for changes.backup_added_bytes: Total number of bytes added to the repository.backup_processed_bytes: Total number of bytes scanned by the backup for changesIt's that simple!
Stick this in with your other compose services for instant backups!
services:
#
# your stuff etc...
#
backup:
image: southclaws/restic-robot
restart: always
environment:
# every day at 2am
SCHEDULE: 0 0 2 * * *
RESTIC_REPOSITORY: my_service_repository
RESTIC_PASSWORD: ${MY_SERVICE_RESTIC_PASSWORD}
# restic-robot runs `restic backup ${RESTIC_ARGS}`
# so this is where you specify the directory and any other args.
RESTIC_ARGS: /data
B2_ACCOUNT_ID: ${B2_ACCOUNT_ID}
B2_ACCOUNT_KEY: ${B2_ACCOUNT_KEY}
volumes:
# Bind whatever directories to the backup container.
# You can safely bind the same directory to multiple containers.
- "/container_data/blog/wordpress:/data/wordpress"
Content type
Image
Digest
Size
17.3 MB
Last updated
about 7 years ago
docker pull mannp/restic-robot