Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker and duplicity multivol_snapshot #103

Open
finevine opened this issue Jul 7, 2022 · 2 comments
Open

docker and duplicity multivol_snapshot #103

finevine opened this issue Jul 7, 2022 · 2 comments

Comments

@finevine
Copy link

finevine commented Jul 7, 2022

Hi,

I'm facing a problem to understand multivol_snapshot of dupliciy.

Trying to restore manually a db from tar.gz files, I cannot untar them because they are on multivol_snapshot.

I have 2 docker-compose using volumerize: one for preprod (rc) and one for production:

rcbackup:
  # https://github.com/blacklabelops/volumerize/tree/master/backends/AmazonS3
  # https://github.com/blacklabelops/volumerize/issues/97
    image: blacklabelops/volumerize:1.6
    container_name: RcBackup
    env_file:
      - ../../.env
    restart: always
    depends_on:
      - rcdb
      - rcweb
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock  
      - /etc/timezone:/etc/timezone:ro          
      - volumerizerccache:/volumerize-cache
      - '../../db_backup:/source/db_backup:ro'
      - '../../media:/source/media:ro'
    environment:         
      - VOLUMERIZE_SOURCE=/source
      - VOLUMERIZE_CACHE=/volumerize-cache
      - VOLUMERIZE_TARGET=s3://s3.eu-west-3.amazonaws.com/${VOLUMERIZE_USER}
      - AWS_ACCESS_KEY_ID=${VOLUMERIZE_USER_ACCESS_KEY}
      - AWS_SECRET_ACCESS_KEY=${VOLUMERIZE_USER_SECRET_KEY}
      - TZ="Europe/Paris"
      - VOLUMERIZE_JOBBER_TIME=0 35 3 * * *
      # - VOLUMERIZE_JOBBER_TIME=0 1/15 * * * *
      - VOLUMERIZE_FULL_IF_OLDER_THAN=7D
      - JOB_NAME2=RemoveOldBackups
      - JOB_COMMAND2=/etc/volumerize/remove-older-than 7D --force
      - JOB_TIME2=0 40 3 * * *
    networks:
      - intern
    labels:
      - traefik.enable=false
volumes:
  rcpgdb:
  volumerizerccache:
  rcredis-data:
  prodbackup:
  # https://github.com/blacklabelops/volumerize/tree/master/backends/AmazonS3
  # https://github.com/blacklabelops/volumerize/issues/97
    image: blacklabelops/volumerize:1.6
    container_name: ProdBackup
    env_file:
      - ../../.env
    restart: always
    depends_on:
      - proddb
      - prodweb
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock  
      - /etc/timezone:/etc/timezone:ro          
      - volumerize-cache:/volumerize-cache
      - '../../db_backup:/source/db_backup:ro'
      - '../../media:/source/media:ro'
    environment:         
      - VOLUMERIZE_SOURCE=/source
      - VOLUMERIZE_CACHE=/volumerize-cache
      - VOLUMERIZE_TARGET=s3://s3.eu-west-3.amazonaws.com/${VOLUMERIZE_USER}
      - AWS_ACCESS_KEY_ID=${VOLUMERIZE_USER_ACCESS_KEY}
      - AWS_SECRET_ACCESS_KEY=${VOLUMERIZE_USER_SECRET_KEY}
      - TZ="Europe/Paris"
      - VOLUMERIZE_JOBBER_TIME=0 35 3 * * *
      - VOLUMERIZE_FULL_IF_OLDER_THAN=7D
      - JOB_NAME2=RemoveOldBackups
      - JOB_COMMAND2=/etc/volumerize/remove-older-than 365D --force
      - JOB_TIME2=0 40 3 * * *
    networks:
      - intern
    labels:
      - traefik.enable=false
volumes:
  prodpgdb:
  volumerize-cache:
  prodredis-data:

First, my volumes were named the same but since I've read that they must not be shared, I've changed the one for preprod to volumerizerccache

But now on the preprod, when I run docker exec RcBackup backup I'm also facing a multivol_snapshot.
I cannot understand why.

Any help? 🙏 🙏
Thank you!

@blacklabelops
Copy link
Owner

I do not understand your question. What is a 'multivol_snapshot'? What does it mean 'to face a multishot_snapshot'?

Why do you rename the volumes, because you run them on the same machine? If you run them on the same machine, why do you rename the volumes but point them to the same folder?

@finevine
Copy link
Author

finevine commented Jul 9, 2022

It means that when I download a duplicity-full.20220706T0000Z.vol1.difftar I have 2 folders:

  • multivol_snapshot
  • snapshot

Files in snapshot can be red in my Macos finder but not thoses on multivol_snapshot.
What I have now understand is that I should not try to restore files manually by downloading archive. I should only use volumerize command to do so.

Yes I run the containers in the same machine. I guess I should not point them to the same folder. But I've understood that source is a temp folder. So this is not a big deal is it?

And thank you for your answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants