trash
fedilink
moddy
creator
link
fedilink
English
21Y

Thank you. Had to edit the folders. Not the stack was “successfully deployed”. Have to watch now if the backup works.

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
creator
link
fedilink
English
11Y

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
link
fedilink
English
1
edit-2
1Y

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
creator
link
fedilink
English
11Y

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

You just need to add the vaultwarden backup service to the same docker-compose file as vaultwarden, and give it the same mount point but :ro for read only.

@HybridSarcasm@lemmy.world
mod
link
fedilink
English
31Y

Based on the vaultwarden wiki, the default DB engine is SQLite. Therefore, all the data is in the sqlite file(s) contained in your data volume. This backup utility seems to take that into account and only focuses on the data volume.

@easeKItMAn@lemmy.world
link
fedilink
English
21Y

Make sure the SQL server is not writing/blocking any files: docker-compose stop vaultwarden

Backup that specific folder to another destination and restart docker-compose up -d

LachlanUnchained
link
fedilink
English
-9
edit-2
1Y

AI GENERATED:


The ttionya/vaultwarden-backup tool is intended to work with Docker volumes. However, you are using a bind mount, not a named volume. Bind mounts refer to the use of local folders to store data, as in your case (./vaultwarden:/data/), while volumes create a specific place within Docker’s own filesystem for the data.

Although this tool is designed for volumes, it might still work with bind mounts if the backup container can access the data directory. You would need to modify the volume line in the Docker Compose file for the backup tool to point to the directory where your bind mount is located, i.e., to point it to your local ./vaultwarden directory.

So, you might want to adjust your docker-compose.yml file like this:

services:
  vaultwarden-backup:
    image: ttionya/vaultwarden-backup:latest
    container_name: vaultwarden-backup
    environment:
      - PUID=1000
      - PGID=1000
      - BACKUP_INTERVAL=12h
      - PRUNE_BACKUPS=7D
    volumes:
      - ./vaultwarden:/vaultwarden:ro
      - ./backups:/backups
    restart: unless-stopped

In this configuration, ./vaultwarden:/vaultwarden:ro line is the key. It mounts your local ./vaultwarden directory to /vaultwarden inside the backup container (readonly mode), which should allow the backup tool to access the data.

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.

Create a post

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!

  • 1 user online
  • 126 users / day
  • 421 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog