Why Backup Your Database?

Regular database backups protect you from:

  • Accidental data deletion
  • Hacking or malware attacks
  • Failed updates or migrations
  • Hardware failures
  • Human error
Best Practice: Create backups before any major changes like updates, migrations, or new plugin installations.

Backup via phpMyAdmin

Export Database

  1. Open phpMyAdmin from EGPNL
  2. Select your database from the left panel
  3. Click the Export tab
  4. Choose export method:
    • Quick: Default settings, good for most cases
    • Custom: More options for advanced users
  5. Format: SQL
  6. Click Go to download the .sql file

Custom Export Options

For custom exports, consider these options:

  • Compression: gzip - reduces file size significantly
  • Add DROP TABLE: Useful for full replacements
  • Data only: Export data without structure
  • Specific tables: Select only needed tables

Import via phpMyAdmin

  1. Open phpMyAdmin
  2. Select the target database (or create a new empty one)
  3. Click the Import tab
  4. Click Choose File and select your .sql or .sql.gz file
  5. Leave other settings as default
  6. Click Go
Import Warning: Importing will overwrite existing tables with the same names. Make sure you're importing to the correct database!

Large File Import

If your backup file exceeds the upload limit:

  • Compress to .sql.gz format
  • Upload via File Manager and import from server
  • Use command line import (see below)
  • Split into smaller files

Command Line Backup

For large databases or automation, use SSH:

Export (mysqldump)

# Basic export
mysqldump -u username -p database_name > backup.sql

# With compression
mysqldump -u username -p database_name | gzip > backup.sql.gz

# Specific tables only
mysqldump -u username -p database_name table1 table2 > backup.sql

# All databases
mysqldump -u username -p --all-databases > all_databases.sql

Import (mysql)

# Import SQL file
mysql -u username -p database_name < backup.sql

# Import gzipped file
gunzip < backup.sql.gz | mysql -u username -p database_name

# Import with progress (for large files)
pv backup.sql | mysql -u username -p database_name

EGPNL Backup System

Manual Backup

  1. Go to Backup in EGPNL
  2. Select Database Backups
  3. Choose databases to backup
  4. Click Create Backup
  5. Download when complete

Automatic Backups

  1. Go to BackupScheduled Backups
  2. Enable automatic backups
  3. Set frequency (daily, weekly)
  4. Choose retention period
  5. Include databases in backup
Storage: Automatic backups use your hosting storage. Monitor backup sizes and adjust retention as needed.

Restore from Backup

Via EGPNL

  1. Go to Backup in EGPNL
  2. Find your backup in the list
  3. Click Restore
  4. Select database restoration
  5. Confirm and wait for completion

Via phpMyAdmin

  1. Drop existing tables (if doing full restore)
  2. Import the backup file
  3. Verify data integrity

Backup Best Practices

  • Regular schedule: Daily for active sites
  • Before changes: Always backup before updates
  • Off-site storage: Keep copies in cloud storage
  • Test restores: Periodically verify backups work
  • Multiple copies: Maintain several backup versions
  • Include files: Backup both database AND files
3-2-1 Rule: Keep 3 copies of your data, on 2 different media types, with 1 copy off-site.

Troubleshooting

Import Fails - Timeout

Large imports may timeout. Solutions:

  • Use command line import instead
  • Split the SQL file into smaller parts
  • Import tables one at a time

Character Encoding Issues

If you see garbled text after import:

  • Ensure export and import use same encoding (UTF-8)
  • Add --default-character-set=utf8mb4 to commands