Backing Up Self-Hosted Installation

I’ve been running a self-hosted installation for over two years now and it works really well. According to the help pages, I just need to backup the bwdata folder, and that’s what I’ve been doing all of this time. Occasional test restorations to a virtual PC show that my backups are working as they should.
But having very recently made changes to my server, I am wondering if I should be stopping the Docker containers before backing up? I haven’t done this in all this time, but it seems safer to stop them, backup the bwdata folder, and then restart them to avoid backing up whilst files/databases are changing. My thoughts are that it makes sense to backup a static “snap shot” of the bwdata folder, rather than a live/changing environment. I’ve changed my backup script to now do this and it works well, but I’m wondering if anyone else has any expert advice on this?

I use bitwarden backup (bruceforce/bw_backup)

https://omegawiki.modem7.com/books/docker/page/current-docker-compose

Line 609 for an example should help you get started

As per this article bitwarden are not using volumes, so it should be ok to use the data folder as backup.

Hi mdoem7, I’ve clicked on the link you’ve given and I have no idea what that web page is about :grimacing:

Hi gerootech, The article you’ve linked to warns about backing up containers whilst they may be in use and suggests stopping the containers before doing the backup. This is what I’ve recently implemented. The official Bitwarden help page https://bitwarden.com/help/article/backup-on-premise/ for self-hosted backups doesn’t make any recommendation to stop the containers before backing up. If stopping them is advisable, then I’m concerned that the help pages don’t mention this. Or maybe it’s not necessary after all?
If anyone has any definitive answer to this, I’m sure it would be very helpful to everyone who has their own self-hosted Bitwarden.

It shows how to backup bitwarden via docker.