blacklabelops / volumerize

Docker Volume Backups Multiple Backends
https://hub.docker.com/r/blacklabelops/volumerize/
MIT License
557 stars 77 forks source link

How to add script executions in docker-compose? #97

Closed jwillmer closed 2 years ago

jwillmer commented 2 years ago

I see that there are scripts available like remove-older-than but from the readme it is unclear for me how I can incorporate them into my setup. Below is my current setup and I would like to know how I can remove backups older then 1 month - I guess all scripts work the same so I can transfer the setup to the others as well.

  backup-to-bucket:
    image: blacklabelops/volumerize:1.6
    container_name: backup-to-bucket
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock  
      - /etc/timezone:/etc/timezone:ro          
      - volumerize-cache:/volumerize-cache
      - mysql-backups:/source/mysql:ro
    environment:         
      - VOLUMERIZE_SOURCE=/source
      - VOLUMERIZE_CACHE=/volumerize-cache
      - VOLUMERIZE_TARGET=b2://${BACKBLAZE_BUCKET_ID}:${BACKBLAZE_BUCKET_KEY}@${BACKBLAZE_BUCKET_NAME}
      - PASSPHRASE=${VOLUMERIZE_PASSPHRASE}
      - TZ=${TZ}
      - VOLUMERIZE_JOBBER_TIME=0 30 4 * * *
      - VOLUMERIZE_FULL_IF_OLDER_THAN=7D
mcondren commented 2 years ago

Did you ever figure this out @jwillmer? I’m trying to do the same thing. I know the script name but can’t figure out the ‘VOLUMERIZE_” environment variable for this.

jwillmer commented 2 years ago

It's 14 days ago and it's not urgent. I hope someone from the project can answer me on this. Otherwise I need to use my try&error skills.

blacklabelops commented 2 years ago

You can take a look here: #98