[Scenario] Your organization runs a critical e-commerce platform with a 500GB MySQL database and a 200GB PostgreSQL analytics database. Daily backups are taking 8 hours, causing performance degradation during peak hours. Recovery drills reveal restoration times of over 12 hours, exceeding your RTO of 4 hours. [Symptoms] Backup processes consume high CPU and I/O, impacting application latency. Restore operations are slow due to large data volumes and lack of parallelism. [Diagnosis] Evaluate your backup strategy: Are you using logical backups (mysqldump, pg_dump) or physical backups (e.g., Percona XtraBackup for MySQL, pg_basebackup for PostgreSQL)? For large databases, physical backups with compression and parallel threads significantly reduce backup window. Check tool capabilities: XtraBackup supports --parallel for copy and --compress, pg_basebackup with multiple workers and compression. Also inspect storage subsystem: are backups written to same disk as data? Is network bandwidth sufficient for remote backups? Use iostat, nmon, and database-specific metrics. [Commands] For MySQL: Use Percona XtraBackup for physical backups: xtrabackup --backup --parallel=4 --compress --compress-threads=2 --target-dir=/backup/mysql For restoration: xtrabackup --prepare --parallel=4 --target-dir=/backup/mysql; rsync to data directory; ensure log sequence. For PostgreSQL: Use pg_basebackup with compression and parallel: pg_basebackup -D /backup/pg -Ft -z -P --compress=9 --waldir=/backup/pg_wal Restore: tar -xzf base.tar.gz -C /var/lib/postgresql/14/main; start server; ensure WAL replay. For logical backups (smaller DBs): mysqldump --single-transaction --quick --compress=lz4 > backup.sql; pg_dump -Fc --compress=9 --jobs=4 > backup.dump. Restoring: mysql -u root < backup.sql; pg_restore -j 4 -d dbname backup.dump. [Risk Controls] Always test backups on a non-production environment. Avoid compressing backup streams directly to final location if I/O bottleneck; use intermediate staging. For MySQL, use --slave-info for replicas. For PostgreSQL, ensure replication slot management. Implement backup retention policies and separate backup storage. [Rollback] In case of failed restoration, revert to original database state by restoring from a previous successful backup. Maintain standby replicas for instant failover if available. Document rollback steps. [Verification] Regularly perform restore tests. Use checksums and database consistency checks (mysqlcheck, pg_verify_checksums). Monitor backup duration and size trends. [When to submit an OpsGlobal ticket] If backup performance does not improve after tuning parameters, if you need assistance with setting up streaming replication for near-zero recovery time, or if you encounter corruption during backup/restore. Our experts provide 24/7 support.
Use cases
Useful for teams handling Database issues and needing a clear troubleshooting and delivery workflow.
Problem background
Learn how to optimize backup and recovery performance for MySQL and PostgreSQL databases, including tools, compression, parallelism, and safety measures for production environments.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.