English | 中文
A simple and easy-to-use automatic backup tool for Vaultwarden, supporting scheduled backups, encrypted storage, and one-click recovery.
- 🔄 Automatic Backup - Scheduled backup of all important data (database, config, attachments, etc.)
- 🔐 Secure Encryption - Encrypt backup files using AES-256-GCM algorithm
- 🐳 Containerized - Ready-to-use Docker image
- 🧹 Auto Cleanup - Automatically delete expired backup files
- ⚡ High Performance - Parallel execution of backup tasks for faster speed
# Pull the image
docker pull ghcr.io/xg4/vaultwarden-backup:latest
# Start backup service (please modify paths and password)
docker run -d \
--name vaultwarden-backup \
-v /path/to/vaultwarden/data:/data \
-v /path/to/backups:/backups \
-e PASSWORD=your-strong-password \
-e BACKUP_INTERVAL=6h \
-e PRUNE_BACKUPS_DAYS=7 \
--restart unless-stopped \
ghcr.io/xg4/vaultwarden-backup:latest
⚠️ Important: Please replace/path/to/vaultwarden/dataand/path/to/backupswith actual paths, and set a strong password
| Environment Variable | Default Value | Description |
|---|---|---|
PASSWORD |
Required | 🔑 Backup file encryption password (please set a strong password) |
BACKUP_INTERVAL |
6h |
⏰ Backup interval time (supports s/m/h, e.g., 6h) |
PRUNE_BACKUPS_DAYS |
30 |
🗂️ Backup retention days (set to 0 to disable cleanup) |
PRUNE_BACKUPS_COUNT |
0 |
🔢 Number of backup files to keep (set to 0 to disable, overrides PRUNE_BACKUPS_DAYS) |
BACKUP_NAME |
vault |
📝 Backup filename prefix |
DATA_DIR |
/data |
📁 Vaultwarden data directory path |
BACKUP_DIR |
/backups |
💾 Backup file storage path |
docker exec vaultwarden-backup vaultb# Decrypt and restore backup file
docker run --rm -it \
-v /path/to/backups:/backups \
ghcr.io/xg4/vaultwarden-backup vaultr \
-i /backups/vault_20240101_120000.tar.gz \
-o /backups/restored \
-p your_passworddocker logs vaultwarden-backup- File Format:
vault_YYYYMMDD_HHMMSS.tar.gz - Encryption Method: AES-256-GCM algorithm
- Backup Content: Database, configuration files, RSA keys, attachments, send files
MIT License - See LICENSE file for details