11
submitted 1 year ago* (last edited 1 year ago) by moddy@feddit.de to c/selfhosted@lemmy.world

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...

you are viewing a single comment's thread
view the rest of the comments
[-] skadden@ctrlaltelite.xyz 1 points 1 year ago

Where do you have that data directory on disk? It's likely not where portainer is looking. Your options are to move it to where portainer is expecting or to use the absolute path to the data directory to the left of the colon for the volume mapping.

For example, I put all my docker compose files in /opt/docker/vaultwarden so if my data were next to it I would use /opt/docker/vaultwarden/vaultwarden-rclone-data:/config/

I don't recall the path where portainer looks but it's going to be wherever you have its docker-compose. I can help you find it if that's the route you'd like to take, but I won't be able to help with that for a few hours.

this post was submitted on 07 Aug 2023
11 points (100.0% liked)

Selfhosted

40134 readers
663 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS