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.
Directory Sources and File Selection
Backups with directory sources show one card per source. Each card offers:
- A file tree ("All files" by default) - expand it to restore only a folder or individual files. Selecting a folder takes everything inside it. The tree loads level by level from the backup's index, so even huge backups browse instantly.
- A restore target: any configured storage destination plus a path, with a folder browser where the destination supports it. When the original directory source still exists, Use original location fills both in one click - and is the preselected default.
- A selection summary with file count, total size, and a warning when the destination cannot serve byte ranges (the restore then transfers the whole archive once).
A database target server is only required when at least one database is selected - restoring only directories out of a database + directory backup works without one.
Download selection (.tar.gz) streams the current file selection straight to your browser instead of restoring it anywhere - the quickest way to get a single file back.
Incremental snapshots
Snapshots from an incremental chain restore transparently - the page shows which chain the snapshot belongs to, and reads from the other archives of the chain automatically. If an archive of the chain is missing, the restore is blocked up front with the missing filename rather than failing halfway.
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
Firebird
gbak -rep -user sysdba -password *** backup.fbk database.fdb- Restore target is limited to the source's pre-configured database aliases
- Always replaces the target file's contents (no separate create-only step)
- See Firebird source for alias configuration
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 foundIf Smart Recovery cannot automatically identify a matching key (e.g. after a key delete and reimport), a "Encryption Key Required" dialog appears. You can:
- Select a vault profile from the dropdown to try
- Paste the raw hex key directly
If you no longer have the key, use the Recovery Kit for offline decryption.
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