Repository navigation
Backup, Restore & Disaster Recovery
Nawed Hossain edited this page Sep 17, 2026
·
1 revision
AlphaDrive includes native hot online backup and disaster recovery tools built directly into the core binary.
You can execute a hot backup while the server is running without any downtime:
# Create a hot backup archive
sudo -u alphadrive alphadrive backup --data-dir /var/lib/alphadrive/data --out /var/backups/alphadrive-$(date +%F).tar.gz- SQLite Database Snapshot: Uses SQLite's online vacuum/backup API to create a clean, consistent snapshot without database locks.
-
Session Keys: Preserves
session.keyto maintain active logins. -
Binary Object Store: Archives all uploaded file blobs (
files/objects/). - Metadata: Embedded backup manifest and schema version.
To schedule automated daily backups at 03:00 AM:
sudo tee /etc/cron.daily/alphadrive-backup > /dev/null << 'EOF'
#!/bin/bash
BACKUP_DIR="/var/backups/alphadrive"
mkdir -p "$BACKUP_DIR"
BACKUP_FILE="$BACKUP_DIR/alphadrive-$(date +\%Y\%m\%d_\%H\%M\%S).tar.gz"
sudo -u alphadrive /usr/local/bin/alphadrive backup --data-dir /var/lib/alphadrive/data --out "$BACKUP_FILE"
# Keep last 7 days of backups
find "$BACKUP_DIR" -type f -name "*.tar.gz" -mtime +7 -delete
EOF
sudo chmod +x /etc/cron.daily/alphadrive-backupTo restore AlphaDrive from a backup archive (e.g. onto a new VPS):
- Install AlphaDrive binary on the target server.
-
Stop the daemon:
sudo systemctl stop alphadrive
-
Execute restore:
sudo -u alphadrive alphadrive restore --data-dir /var/lib/alphadrive/data --in /var/backups/alphadrive-2026-09-17.tar.gz
-
Start the daemon:
sudo systemctl start alphadrive
- All users, files, folders, shares, and settings are fully restored.
Lightweight. Self-hosted. Yours.
Documentation · GitHub · Releases · Contribute · MIT License
Self-hosted file storage built for simplicity, speed, and control.
© 2026 AlphaDrive contributors. Built for people who want their files to stay theirs.