Backing Up

Backing Up

Repliqate uses Docker labels for configuration. This keeps backup policies close to the containers and volumes they apply to, eliminating the need for separate configuration files.

Container Labels

LabelDescriptionDefaultExample
repliqate.enabledEnables backup for the containerfalsetrue
repliqate.engineBackup engine selectionresticrestic
repliqate.scheduleBackup schedule (cron format)none@daily 3am (see Scheduling section)
repliqate.backup_idUnique backup identifier for the container.

NOTE: Ensure this is fully unique across all containers on the docker server.
noneprod-db-01
repliqate.retentionKeep all snapshots taken within the specified time span (years, months, days, hours) before the latest snapshot.N/A2y5m7d3h keeps snapshots from the last 2 years, 5 months, 7 days, and 3 hours.

Volume Labels

LabelDescriptionDefault
repliqate.excludeExclude this volume from container backups.false

Examples

Shell

Simple

docker run -d \
  --label repliqate.enabled=true \
  --label repliqate.engine=restic \
  --label repliqate.schedule="@daily 3am" \
  --label repliqate.backup_id=my_app_01 \
  --name my_app \
  my_image:latest

Compose

Example 1

services:
  app:
    image: my-app:latest
    volumes:
      - data:/my-app/data
      - uploads:/my-app/uploads
    labels:
      repliqate.enabled: 'true'
      repliqate.schedule: "@daily 10:34"
      repliqate.engine: restic
      repliqate.backup_id: my_app

volumes:
  data:
    labels:
      repliqate.exclude: 'true' # Exclude from being backed up
  uploads: