captainVersion: 4 services: $$cap_appname: image: offen/docker-volume-backup:$$cap_version environment: AWS_ACCESS_KEY_ID: $$cap_aws_access_key_id AWS_SECRET_ACCESS_KEY: $$cap_aws_secret_access_key AWS_S3_BUCKET_NAME: $$cap_aws_s3_bucket_name AWS_ENDPOINT: $$cap_aws_endpoint BACKUP_FILENAME: $$cap_backup_filename BACKUP_CRON_EXPRESSION: $$cap_backup_cron_expression BACKUP_RETENTION_DAYS: $$cap_backup_retention_days volumes: - $$cap_volume_to_backup:/backup/data:ro restart: always caproverExtra: notExposeAsWebApp: 'true' caproverOneClickApp: variables: - id: $$cap_version label: Docker volume backup version defaultValue: 'v2' description: Check out their Docker page for the valid tags https://hub.docker.com/r/offen/docker-volume-backup/tags validRegex: /^([^\s^\/])+$/ - id: $$cap_volume_to_backup label: Volume to backup description: Path of the volume that you want to backup, e.g. `/var/lib/docker/volumes/captain--my-app/_data` - id: $$cap_aws_access_key_id label: AWS_ACCESS_KEY_ID - id: $$cap_aws_secret_access_key label: AWS_SECRET_ACCESS_KEY - id: $$cap_aws_s3_bucket_name label: Bucket name - id: $$cap_aws_endpoint label: AWS Endpoint description: This is the FQDN of your storage server, e.g. `storage.example.com`. Do not set this when working against AWS S3 (the default value is `s3.amazonaws.com`). If you need to set a specific (non-https) protocol, you will need to use the option below. - id: $$cap_backup_filename label: Backup filename defaultValue: 'backup-%Y-%m-%dT%H-%M-%S.tar.gz' description: The name of the backup file including the `.tar.gz` extension. Format verbs will be replaced as in `strftime`. Omitting them will result in the same filename for every backup run, which means previous versions will be overwritten on subsequent runs. The default results in filenames like `backup-2021-08-29T04-00-00.tar.gz`. - id: $$cap_backup_cron_expression label: Cron expression defaultValue: '@daily' description: Backups run on the given cron schedule in `busybox` flavor. If no value is set, `@daily` will be used. If you do not want the cron to ever run, use `0 0 5 31 2 ?`. - id: $$cap_backup_retention_days label: Backup retention days defaultValue: '14' description: Define this value to enable automatic rotation of old backups. The value declares the number of days for which a backup is kept. instructions: start: >- Backup Docker volumes to any S3 compatible storage. See https://github.com/offen/docker-volume-backup end: >- Aaaand you're done! 😄 Your service is up and running displayName: Offen Docker Backup (S3) isOfficial: true description: Backup Docker volumes to any S3 compatible storage documentation: Taken from https://github.com/offen/docker-volume-backup