这是indexloc提供的服务,不要输入任何密码
Skip to content

What exactly happen when BACKUP_FROM_SNAPSHOT=true? #49

@SergeiCherevko

Description

@SergeiCherevko

Hello!
Can anyone explaine what exactly happens when i use variable BACKUP_FROM_SNAPSHOT=true?

I test backup prometheus DB without stop, but with BACKUP_FROM_SNAPSHOT and i receive an error

Failure running docker-volume-backup at 2022-01-18T00:00:00+03:00
Running docker-volume-backup failed with error: takeBackup: error creating snapshot: open /backup/prometheus_data/01FSM8TPFEXQ0QC28H11PMQZ0R: no such file or directory
Log output of the failed run was:
time="2022-01-18T00:04:00+03:00" level=error msg="Fatal error running backup: takeBackup: error creating snapshot: open /backup/prometheus_data/01FSM8TPFEXQ0QC28H11PMQZ0R: no such file or directory"
time="2022-01-18T00:04:03+03:00" level=info msg="Removed snapshot /tmp/backup."

If i use label which is stops container before backup - all ok

Here part of compose file

  backup:
    container_name: prometheus_backup
    image: offen/docker-volume-backup:v2.7.2
    restart: always
    environment:
      BACKUP_FILENAME: backup-{{ prometheus_name }}-%Y-%m-%dT%H-%M-%S.tar.gz
      BACKUP_FROM_SNAPSHOT: "true"
      BACKUP_RETENTION_DAYS: "7"
      NOTIFICATION_LEVEL: "info"
      NOTIFICATION_URLS: "{{ slack_hook}}"
      # BACKUP_STOP_CONTAINER_LABEL: {{ prometheus_name }}
    volumes:
      - "{{ prometheus_volume_config }}:/backup/{{ prometheus_volume_config }}:ro"
      - "{{ prometheus_volume_data }}:/backup/{{ prometheus_volume_data }}:ro"
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - "/hdd/backup/{{ prometheus_name }}:/archive"
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    networks:
      - docker_office

networks: 
  docker_office:
    external: true
  
volumes:
  {{ prometheus_volume_config }}:
    external: true  
  {{ prometheus_volume_data }}:
    external: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions