Docker Volume Backup을 위한 docker-volume-backup

나중에 테스트해볼것으로 ㅎ 와드입니당 

 

 GitHub - offen/docker-volume-backup: Backup Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox or SSH compatible storagegithub.comBackup Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox or SSH compatible storage - offen/docker-volume-backup 

 

도커 볼륨 백업

Docker 볼륨을 로컬로 백업하거나 S3, WebDAV, Azure Blob Storage, Dropbox 또는 SSH 호환 스토리지에 백업하세요.

offen /docker-volume-backup Docker 이미지는 기존 Docker 설정에 대한 경량(15MB 미만) 동반 컨테이너로 사용할 수 있습니다. Docker 볼륨을 로컬 디렉터리 , S3 , WebDAV, Azure Blob Storage, Dropbox 또는 SSH 호환 스토리지(또는 이들의 조합)에 대한 반복 또는 일회성 백업을 처리 하고 구성된 경우 오래된 백업을 순환시킵니다. 또한 GPG를 사용하여 백업을 암호화 하고 (실패한) 백업 실행에 대한 알림을 보내는 기능 도 지원합니다 .        

설명서는 https://offen.github.io/docker-volume-backup 에서 찾을 수 있습니다.

 

version: '3'

services:
  volume-consumer:
    build:
      context: ./my-app
    volumes:
      - data:/var/my-app
    labels:
      # This means the container will be stopped during backup to ensure
      # backup integrity. You can omit this label if stopping during backup
      # not required.
      - docker-volume-backup.stop-during-backup=true

  backup:
    # In production, it is advised to lock your image tag to a proper
    # release version instead of using `latest`.
    # Check https://github.com/offen/docker-volume-backup/releases
    # for a list of available releases.
    image: offen/docker-volume-backup:latest
    restart: always
    env_file: ./backup.env # see below for configuration reference
    volumes:
      - data:/backup/my-app-backup:ro
      # Mounting the Docker socket allows the script to stop and restart
      # the container during backup. You can omit this if you don't want
      # to stop the container. In case you need to proxy the socket, you can
      # also provide a location by setting `DOCKER_HOST` in the container
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # If you mount a local directory or volume to `/archive` a local
      # copy of the backup will be stored there. You can override the
      # location inside of the container by setting `BACKUP_ARCHIVE`.
      # You can omit this if you do not want to keep local backups.
      - /path/to/local_backups:/archive
volumes:
  data: