What is it?
The Database Backup module is a secure tool for creating backups of your WordPress site's database. It allows for automatic backup creation, manual creation, downloading, and deleting backups.
Main Features
1. Automatic Backups
- Schedule: Set automatic backup creation (daily, weekly, monthly)
- Time: Choose a convenient time for backup creation
- Time Zone: Automatically adjusts to WordPress time zone
- Email Notifications: Receive notifications about backup success or failure
2. Manual Backup Creation
- One Click: Create a backup at any time
- Real-time Progress: Track backup creation progress in real time
- Security: Backups are secured and compressed to ZIP format
3. Backup Management
- Backup List: Browse all created backups
- Download: Download backup directly to your computer
- Delete: Delete old backups to free up disk space
- Automatic Rotation: Optionally delete old backups after a specified number of days
4. Advanced Settings
- SQL Export Method: Choose export method (Auto, mysqldump, PHP)
- mysqldump Path: Automatically detects or manually set the path to mysqldump
- Query Size Limit: Control the maximum size of a single SQL query
- Processing Mode: Choose processing mode (single-threaded or multi-threaded)
- Memory Limits: Adjust memory and execution time limits for large databases
How it Works?
Creating Backups
- The module analyzes the database structure
- Selects the optimal backup creation method based on database size
- For small databases (< 50 MB): uses fast single-threaded method
- For medium databases (50-500 MB): uses batch processing
- For large databases (> 500 MB): uses advanced multi-threaded processing
- Data is compressed to ZIP format, saving disk space
Importing Backups
- Backups are validated for security before import
- The module automatically detects and preserves your site settings (URL, theme, plugins)
- Error handling: automatic retry of queries in case of errors
- After import, automatic repairs occur (link regeneration, cache clearing)
Security
- File Validation: Checking ZIP file validity before import
- Table Validation: Verifying that tables in the backup match your installation
- SQL Injection Protection: All queries are safely prepared
- Access Preservation: Ensures you won't be locked out after import
Why Use It?
Protection Against Data Loss
- Regular backups protect against data loss due to server failure, hacker attacks, or human error
- Ability to quickly restore the site to its state before the problem
Before Major Changes
- Always create a backup before updating WordPress, plugins, or changing configuration
- Backups are useful when migrating the site to another server or changing hosting
Space Saving
- Backups are compressed to ZIP format, significantly reducing file size
- Automatic backup rotation prevents disk filling
- Ability to manually delete old backups gives full control over disk space
Usage Tips
For Beginners
- Start with automatic backups: If you're just starting, enable a daily schedule with low frequency
- Test manual creation: Before enabling automatic backups, create a few manual backups to test functionality
- Check disk space: Ensure you have enough space for backups (the module shows available space)
- Keep local copies: Download backups and store them on your computer as additional security
For Advanced Users
- Adjust advanced settings: If you have a large database, adjust memory and execution time limits
- Monitor creation time: Track how long backup creation takes to optimize the schedule
- Use mysqldump export method: If your server supports mysqldump, use this method for faster and more efficient backups
- Enable email notifications: Receive notifications about backup status to stay updated on progress
Troubleshooting
Backup Not Creating
- Check server limits: Ensure PHP memory and execution time limits are sufficient
- Increase limits: In the "Advanced Settings" section, you can increase memory and time limits
- Try PHP method: If the mysqldump method doesn't work, try the PHP export method
- Contact technical support: If the problem persists, contact the technical support department
Import Not Working
- Check version compatibility: Ensure the MySQL/MariaDB version in the backup is compatible with your server
- Verify ZIP file: Check if the ZIP file is not corrupted
- Check table prefix: Ensure the table prefix in the backup matches your installation
- Use dry run mode: If importing fails, try importing in dry run mode (without validation)
Best Practices
Regular Backups
- Daily: For active stores with a large number of orders
- Weekly: For sites with less activity
- Before major changes: Always create a backup before updating
Backup Storage
- Download and save: Download backups and save them in a safe place outside the server
- Multi-rotation approach: Store backups in different locations (e.g., cloud, external drive)
- Name backups: Use clear names for backups, e.g., "backup-before-update-2025-01-11.sql.zip"
Technical Support
If you encounter problems with the Database Backup module:
- Check logs in the "System Health" section in the admin panel
- Ensure the
exec() function is available on your server (required for mysqldump method) - Check PHP memory limits in server settings
- Contact DevDoit technical support