Restore
Restore databases from your backups.
Overview
DBackup can restore backups directly to database servers. The restore process:
- Downloads backup from storage
- Decrypts (if encrypted)
- Decompresses (if compressed)
- Executes restore commands
- Verifies completion
Starting a Restore
From Storage Explorer
- Go to Storage Explorer in sidebar
- Find the backup to restore
- Click Restore button
- Configure restore options
- Confirm and start
From History
- Go to History in sidebar
- Find successful backup execution
- Click Restore from this backup
- Configure options
Restore Options
Target Selection
| Option | Description |
|---|---|
| Target Source | Database connection to restore to |
| Target Database | Specific database name (optional) |
Existing Databases on Target
After selecting a target source, DBackup automatically queries the server and displays all existing user databases in a collapsible overview:
| Column | Description |
|---|---|
| Database | Name of the existing database |
| Size | Total size (data + indexes) |
| Tables | Number of tables or collections |
Conflict Detection: If a database from the backup has the same target name as an existing database on the server, the row is highlighted in red with a ⚠️ warning icon — indicating that database will be overwritten during restore.
A summary footer shows the total number of databases and their combined size.
TIP
This overview helps you verify the current state of the target server before restoring. Use it to spot naming conflicts and check available capacity.
Database Mapping
Restore to different database names:
Source Database → Target Database
─────────────────────────────────
production → staging_copy
users_prod → users_testConfigure in the mapping section of restore dialog.
Privileged Credentials
For creating new databases:
- Enable Use Privileged Auth
- Enter elevated credentials
- These are used for
CREATE DATABASEonly
Regular restore uses the source configuration credentials.
Restore Process
Pipeline
1. Download
└── Fetch from storage destination
2. Decrypt (if needed)
└── Use encryption profile
└── Smart key discovery
3. Decompress (if needed)
└── Gzip or Brotli
4. Pre-flight Checks
└── Version compatibility
└── Permission verification
5. Restore
└── Execute database-specific restore
6. Verification
└── Check for errors
└── Validate completion
7. Cleanup
└── Remove temp filesProgress Tracking
During restore, view:
- Current step
- File download progress
- Restore status
- Live log output
Database-Specific Restore
MySQL/MariaDB
mysql -h host -u user -p database < backup.sql- Drops and recreates tables
- Imports all data
- Restores triggers, procedures
PostgreSQL
psql -h host -U user -d database -f backup.sql- Can create database if privileged
- Restores schema and data
- Handles sequences, indexes
MongoDB
mongorestore --uri "mongodb://..." --archive=backup.archive- Restores all collections
- Can restore to different database
- Preserves indexes
SQLite
- Replaces entire database file
- Or restores via
.readcommand - Path remapping supported
Microsoft SQL Server
RESTORE DATABASE [dbname] FROM DISK = '/path/backup.bak'- Full database restore
- Requires shared volume
- Uses T-SQL commands
Safety Features
Version Guard
Prevents restoring newer backups to older servers:
❌ MySQL 8.0 backup → MySQL 5.7 server
✅ MySQL 5.7 backup → MySQL 8.0 serverOverwrite Protection
Before overwriting existing database:
- Warning displayed
- Confirmation required
- Consider backup first
Rollback Considerations
Restore is not automatically reversible:
- Backup target before restore
- Test on staging first
- Keep source backup
Smart Key Recovery
If encryption profile ID doesn't match:
- System scans all available profiles
- Attempts decryption with each
- Validates by checking content
- Uses matching key automatically
This helps when:
- Key was imported with new ID
- Profile was recreated
- After disaster recovery
Common Scenarios
Restore to Same Database
Original state restoration:
- Select same source as backup
- Leave database mapping empty
- Existing data is replaced
Clone to New Database
Create copy of database:
- Select same source
- Map original → new name
- Enable privileged auth
- New database created
Migrate to Different Server
Move database between servers:
- Select different source
- Configure connection
- Restore creates database
Multi-Database Restore
When restoring a backup containing multiple databases:
- Automatic Detection: DBackup detects Multi-DB TAR archives
- Database Selection: Choose which databases to restore
- Rename Support: Map databases to different names
- Progress Tracking: Per-database progress indication
Multi-DB Backup Contents:
┌─────────────────────────────────────────┐
│ ☑ production → staging_copy │
│ ☑ users → users_test │
│ ☐ logs → (skip) │
│ ☑ config → config │
└─────────────────────────────────────────┘Each selected database is restored individually, allowing granular control over what gets restored and where.
Troubleshooting
Permission Denied
ERROR: permission denied to create databaseSolutions:
- Enable privileged auth
- Provide admin credentials
- Pre-create empty database
Version Mismatch
ERROR: backup version (8.0) newer than server (5.7)Solutions:
- Upgrade target server
- Use older backup
- Manual dump conversion (complex)
Timeout During Restore
Causes:
- Large database
- Slow network
- Resource constraints
Solutions:
- Increase request timeout
- Restore during low-usage
- Check server resources
Encryption Key Not Found
ERROR: encryption profile not foundSolutions:
- Import key to Vault
- Smart recovery should find it
- Use Recovery Kit manually
Character Set Issues
ERROR: invalid character in identifierSolutions:
- Check source/target charset match
- Set connection charset
- Convert dump if needed
Best Practices
Before Restore
- Verify backup - Download and inspect
- Backup target - In case of issues
- Test on staging - Before production
- Schedule downtime - For production restores
During Restore
- Monitor progress - Watch for errors
- Don't interrupt - Let it complete
- Check logs - Review output
After Restore
- Verify data - Check key tables
- Test application - Functionality check
- Update connections - If database renamed
- Document - Record what was restored
Restore History
All restores are logged in History:
- Timestamp
- Source backup
- Target database
- Status (Success/Failed)
- Duration
- Detailed logs
Next Steps
- Storage Explorer - Browse backups
- Encryption - Understanding encryption
- Recovery Kit - Manual decryption