DEV Community

pineapplemeat
pineapplemeat

Posted on • Edited on

Start new docker container to run duplicacy to back up specific directory

CONTAINER_NAME="duplicacy-somefolder"
PATH_TO_SOURCE_DATA="/path/to/data/to/backup"
SNAPSHOT_ID=10001
PATH_TO_BACKUP_STORAGE="/path/to/duplicacy/repository"
DUPLICACY_PASSWORD="password-to-encrypt-backup"

docker run \
  -d \
  --name $CONTAINER_NAME \
  -v $PATH_TO_SOURCE_DATA:/data:ro \
  -v $PATH_TO_BACKUP_STORAGE:/backup-target \
  -e BACKUP_CRON="0 0 * * 0" \
  -e SNAPSHOT_ID=$SNAPSHOT_ID \
  -e STORAGE_URL=/backup-target \
  -e FILTER_PATTERNS=$FILTER_PATTERNS \
  -e DUPLICACY_PASSWORD=$DUPLICACY_PASSWORD \
  azinchen/duplicacy:latest

Enter fullscreen mode Exit fullscreen mode

Top comments (0)