bitwarden / bitwarden/server

The backup-db.sh script should be easily configurable

Open
#7,581 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
20.1k
Forks
1.8k
Avg merge
4d 8h
Merged PRs (30d)
75

Description

The script for the database backups can be improved: https://github.com/bitwarden/server/blob/main/util/MsSql/backup-db.sh

The deletion section incorrectly states that files older than 30 days are deleted, when in fact the age for them to be deleted is 32 days.

The retention time should be configurable by setting a environment variable in a `docker-compose.override.yml` or a value in ./bwdata/config.yml.

### Build Version

2025.12

### Environment

Self-Hosted

### Issue Tracking Info

- [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Contributor guide

Open the contributing guide

Research direction

Start with util/MsSql/backup-db.sh and inspect how its current 32-day deletion threshold is set and described. Then check ./bwdata/config.yml and docker-compose.override.yml to determine the supported configuration path; done means the retention value is configurable and the deletion description matches the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, shell, sql
Domain
databases, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.