Skip to content

Troubleshooting

Common problems and solutions for EcomSec Backup Professional.

Backup Issues

"mysqldump not found"

Problem: The mysqldump command is not available on your system.

Solution:

Debian/Ubuntu:

bash
sudo apt-get update
sudo apt-get install mysql-client

CentOS/RHEL:

bash
sudo yum install mysql

Shared Hosting: Contact your hosting provider.

Verify installation:

bash
which mysqldump
# Should output: /usr/bin/mysqldump

"Permission denied" when creating backup

Problem: Backup directory is not writable.

Solution:

bash
# Set correct permissions
sudo chmod 700 /var/backups
sudo chown www-data:www-data /var/backups

# Verify
ls -la /var/backups
# Should show: drwx------ www-data www-data

Alternative: Change backup path in plugin configuration to a writable directory.


Backup fails with "Disk quota exceeded"

Problem: Not enough disk space.

Solution:

  1. Check available space:
bash
df -h
  1. Free up space:

    • Delete old backups manually
    • Reduce retention policy
    • Use external storage (S3, FTP)
  2. Calculate required space:

    • Minimum: 2x (Database + Media files)
    • Recommended: 3-5x for multiple backup versions

Backup stuck at "Running" status

Problem: Backup process hung or crashed.

Solution:

  1. Check logs:
bash
tail -f var/log/dev.log
  1. Check process:
bash
ps aux | grep mysqldump
ps aux | grep tar
  1. Kill stuck process:
bash
# Find process ID
ps aux | grep mysqldump
# Kill it
sudo kill -9 <PID>
  1. Restart message queue consumer:
bash
bin/console messenger:consume async --time-limit=3600

"exec() has been disabled for security reasons"

Problem: PHP function exec is disabled in php.ini.

Solution:

VPS/Dedicated:

  1. Edit php.ini:
bash
sudo nano /etc/php/8.0/fpm/php.ini
  1. Find disable_functions and remove exec:
ini
; Before:
disable_functions = exec,shell_exec,system

; After:
disable_functions = system
  1. Restart PHP-FPM:
bash
sudo systemctl restart php8.0-fpm

Shared Hosting: Contact your hosting provider to enable exec.


Restore Issues

Restore fails with "Backup file not found"

Problem: Backup file was deleted or moved.

Solution:

  1. Check if file exists:
bash
ls -la /var/backups
  1. Check file permissions:
bash
ls -la /var/backups/backup_*.tar.gz
  1. If file was moved: Update the file path in the database or move it back.

Restore fails with "Invalid encryption key"

Problem: Wrong encryption key or corrupted backup.

Solution:

  1. Verify encryption key in plugin configuration
  2. Try with original key if you changed it
  3. Check backup integrity:
bash
# For tar.gz
tar -tzf backup.tar.gz > /dev/null
echo $?  # Should output: 0

# For sql.gz
zcat backup.sql.gz | head -10
  1. If backup is corrupted: Use a different backup

Database restore fails with "Access denied"

Problem: Database credentials incorrect or user lacks permissions.

Solution:

  1. Check .env file:
bash
cat .env | grep DATABASE
  1. Verify credentials:
bash
mysql -u username -p -h localhost
  1. Grant permissions:
sql
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
FLUSH PRIVILEGES;

Shop shows errors after restore

Problem: Cache not cleared or file permissions wrong.

Solution:

  1. Clear cache:
bash
bin/console cache:clear
rm -rf var/cache/*
  1. Fix file permissions:
bash
chmod -R 755 .
chmod -R 775 var/ public/media/ public/thumbnail/ files/
chown -R www-data:www-data .
  1. Rebuild theme:
bash
bin/console theme:compile
  1. Regenerate thumbnails:
bash
bin/console media:generate-thumbnails

Performance Issues

Backup takes very long (> 1 hour)

Problem: Large database or many files.

Solution:

  1. Use Database-only backups more frequently (faster)
  2. Use Files-only backups less frequently
  3. Optimize database:
bash
bin/console database:optimize
  1. Increase PHP limits:
ini
; php.ini
max_execution_time = 7200
memory_limit = 512M

Message queue consumer crashes

Problem: Memory limit or timeout.

Solution:

  1. Increase memory limit:
bash
bin/console messenger:consume async --memory-limit=512M --time-limit=3600
  1. Run as systemd service:
ini
# /etc/systemd/system/shopware-messenger.service
[Unit]
Description=Shopware Messenger Consumer

[Service]
Type=simple
User=www-data
Restart=always
RestartSec=10
ExecStart=/usr/bin/php /var/www/html/bin/console messenger:consume async --time-limit=3600

[Install]
WantedBy=multi-user.target

Encryption Issues

Cannot decrypt backup

Problem: Lost encryption key or wrong key.

Solution:

If you have the key:

  1. Verify key in plugin configuration
  2. Try manual decryption:
bash
# Plugin uses OpenSSL AES-256-CBC
openssl enc -d -aes-256-cbc -in backup.tar.gz.encrypted -out backup.tar.gz -k YOUR_KEY

If you lost the key:

  • Encrypted backups cannot be recovered
  • Use an older unencrypted backup
  • Prevention: Always store encryption key securely!

Audit Log Issues

Audit log entries missing

Problem: Database issue or plugin not properly installed.

Solution:

  1. Check if table exists:
bash
bin/console dbal:run-sql "SHOW TABLES LIKE 'ecomsec_backup_audit_log'"
  1. Reinstall plugin:
bash
bin/console plugin:uninstall EcomSecBackupProfessional
bin/console plugin:install EcomSecBackupProfessional
bin/console plugin:activate EcomSecBackupProfessional

Getting Help

If your issue is not listed here:

  1. Check logs:

    • var/log/dev.log
    • var/log/prod.log
    • Audit Log in plugin
  2. Search GitHub Issues:

  3. Create new issue:

    • Include error messages
    • Include relevant logs
    • Describe steps to reproduce
  4. Contact support:


Useful Commands

Check system requirements

bash
# Check PHP version
php -v

# Check mysqldump
which mysqldump
mysqldump --version

# Check tar/gzip
which tar
which gzip

# Check disk space
df -h

# Check PHP functions
php -r "echo (function_exists('exec') ? 'exec: enabled' : 'exec: disabled') . PHP_EOL;"

Debug backup

bash
# Watch logs in real-time
tail -f var/log/dev.log

# Check message queue
bin/console messenger:stats

# Consume messages manually
bin/console messenger:consume async -vv

Manual backup (emergency)

bash
# Database
mysqldump -u user -p database > backup.sql
gzip backup.sql

# Files
tar -czf backup_files.tar.gz \
  --exclude='var/cache' \
  --exclude='var/log' \
  config custom files public/media public/theme

See Also

Released under the MIT License.