This thread explores different methods to back up all MySQL databases on a single server with minimal effort. Whether you’re using a command-line tool or a web-based interface, these tips will help you save time and avoid data loss.
Use the --all-databases
option with mysqldump
to export everything:
mysqldump -u root -p --all-databases > full_backup.sql
This will prompt for your password and export all databases into a single SQL file named full_backup.sql
.
You can automate the backup using a cron job:
0 3 * * * mysqldump -u root -pYourPassword --all-databases | gzip > /backups/all-dbs-$(date +\%F).sql.gz
⚠️ Make sure to secure your password or use ~/.my.cnf
to avoid exposing it directly.
phpMyBackupPro is a simple web-based tool that allows you to back up all MySQL databases with a few clicks. Features include:
cron.php
Download it from the official website.
Method | Automation | Compression | Complexity |
---|---|---|---|
mysqldump CLI | Via cron | Manual (use gzip) | Medium |
phpMyBackupPro | Built-in cron script | GZIP / ZIP / none | Easy |
For system administrators comfortable with the terminal, mysqldump
is flexible and powerful. For shared hosting users or those seeking simplicity, phpMyBackupPro offers a reliable, web-based alternative with scheduling options and a user-friendly interface.