Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 3.12 KB

File metadata and controls

83 lines (61 loc) · 3.12 KB

Vaultwarden Backup Tool

English | 中文

A simple and easy-to-use automatic backup tool for Vaultwarden, supporting scheduled backups, encrypted storage, and one-click recovery.

✨ Features

  • 🔄 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

🚀 Quick Start

One-Click Deployment

# 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/data and /path/to/backups with actual paths, and set a strong password

⚙️ Configuration Options

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

📋 Common Operations

Manual Backup

docker exec vaultwarden-backup vaultb

Restore Backup

# 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_password

View Logs

docker logs vaultwarden-backup

📝 Backup Information

  • File Format: vault_YYYYMMDD_HHMMSS.tar.gz
  • Encryption Method: AES-256-GCM algorithm
  • Backup Content: Database, configuration files, RSA keys, attachments, send files

📄 License

MIT License - See LICENSE file for details