I would like to backup my vaultwarden with ttionya/vaultwarden-backup. I found the linked docker-compose-file but it does not work in my case.

I just learnt - thanks to u/this_is_router and u/inner - that i store my vaultwarden-data in a local folder in the compose-directory, so in my case the dopcker compose looks like this:


services:

  vaultwarden:
    image: vaultwarden/server:latest
    restart: always
    # environment:
    #   SIGNUPS_ALLOWED: 'false'
    #   ADMIN_TOKEN: 'your authentication token'
    ports:
      - '127.0.0.1:8200:80'
    volumes:
      - ./vaultwarden:/data/

  backup:
    image: ttionya/vaultwarden-backup:latest
    restart: always
    # environment:
    #   RCLONE_REMOTE_NAME: 'BitwardenBackup'
    #   RCLONE_REMOTE_DIR: '/BitwardenBackup/'
    #   RCLONE_GLOBAL_FLAG: ''
    #   CRON: '5 * * * *'
    #   ZIP_ENABLE: 'TRUE'
    #   ZIP_PASSWORD: 'WHEREISMYPASSWORD?'
    #   ZIP_TYPE: 'zip'
    #   BACKUP_FILE_SUFFIX: '%Y%m%d'
    #   BACKUP_KEEP_DAYS: 0
    #   PING_URL: ''
    #   MAIL_SMTP_ENABLE: 'FALSE'
    #   MAIL_SMTP_VARIABLES: ''
    #   MAIL_TO: ''
    #   MAIL_WHEN_SUCCESS: 'TRUE'
    #   MAIL_WHEN_FAILURE: 'TRUE'
    #   TIMEZONE: 'UTC'
    volumes:
      - ./vaultwarden:/bitwarden/data/
      - ./vaultwarden-rclone-data:/config/
    #   - /path/to/env:/.env

volumes:
  vaultwarden-data:
    # Specify the name of the volume where you save the vaultwarden data,
    # use vaultwarden-data for new users
    # and bitwardenrs-data for migrated users
    name: vaultwarden-data
  vaultwarden-rclone-data:
    external: true
    # Specify the name of the volume where you save the rclone configuration,
    # use vaultwarden-rclone-data for new users
    # and bitwardenrs-rclone-data for migrated users
    name: vaultwarden-rclone-data

EDIT: Now it runs! I just had to edit the folders. Edited the docker-compose.yml above. Thanks…

  • doeknius_gloek@feddit.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    You’d need to post your complete docker-compose.yaml, otherwise nobody knows what you’re doing.

    Also (and I don’t want to sound rude) you should probably start learning docker with a less critical service. If you just learned how volumes work you should not store your passwords in one. Yet.

    • moddy@feddit.deOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      No problem. I use vaultwarden for years. In this case I am not really worried about data-loss because bitwarden keeps an copy of your credentials offline. So in the worst case, i can export them.

      I would like to post it, but i have issues with formatting. voyager does not have this “code-format” and writes everything in one line.

      Is there a workaround?

      • obosob@feddit.uk
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You just use three backticks to start and end a code block, it’s just markdown.

        e.g.

        version: '3.4' 
          
         services: 
          
           vaultwarden: 
             image: vaultwarden/server:latest 
             restart: always 
             # environment: 
             #   SIGNUPS_ALLOWED: 'false' 
             #   ADMIN_TOKEN: 'your authentication token' 
             ports: 
               - '127.0.0.1:8200:80' 
             volumes: 
               - vaultwarden-data:/data/ 
        ...
        
        • moddy@feddit.deOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          That’s it. Nice. I tried ’ instead of `, so the 2nd useful thing i learnd today. Thanks.