phpMyBackupPro is an open source very easy to use web based MySQL backup application, written in PHP language released under the GNU GPL. It allows you to create schedule backups, restore and manage them, download, email, or upload backups to any FTP server and lot more. It also takes File directories backup and upload them on a FTP Server.
It supports three compression levels of backups (No compression, zip or gzip compression). It also supports two alternative security login methods, HTTP or HTML authentication.
Following are some major key features of “phpMyBackupPro“.
- Single or Multiple database backup support with or without data, table structure.
- Three level of compression supported are no compression, gzip or zip compression.
- Create scheduled backups without cron jobs using small PHP script.
- Upload backups directly onto FTP server and posting of backups by email.
- Only Apache and PHP needed to run on platforms like Linux, Mac or Windows.
- Shell interface to take backups manually or by using cron script.
- Whole File directory backup and move them to any FTP server.
- Take databases backup from different accounts on several MySQL servers.
- Two security authentication methods supported HTTP or HTML login authentication.
- Friendly interface and very easy to install and setup.
- Multiple language supported.
Taking MySQL backups and restoring them from command line is always a good practice, but if what when you don’t have physical access to server. In that, situation phpMyBackupPro tool comes in handy.
How to Install phpMyBackupPro in RHEL/CentOS/Fedora and Debian/Ubuntu
For installing phpMyBackupPro application, you must have running Apache web server and PHP installed on the server. Let’s install these required packages on the server.
Install Apache and PHP
Install on Red Hat based systems using yum command.
# yum install httpd php php-mysql [RHEL/CentOS 7] # yum install httpd php php-mysqlnd [RHEL/CentOS 8] # service httpd start
Install on Debian based systems using apt-get command.
# apt-get install apache2 # apt-get install php libapache2-mod-auth-mysql php-mysql # service apache2 start
The newest phpMyBackupPro version can be downloaded from phpMyBackupPro website or you may use following wget command to download.
# cd /usr/share # wget https://sourceforge.net/projects/phpmybackup/files/phpMyBackupPro/phpMyBackupPro%202.5/phpMyBackupPro-2.5.zip/download -O phpMyBackupPro-2.5.zip
Unzip the phpMyBackupPro zip file under /usr/share/ directory.
# unzip phpMyBackupPro-2.5.zip
For security reasons, it’s better to place the content of the folder under /usr/share/phpmybackup directory.
# cd /usr/share/ # mv phpMyBackupPro-2.5/ /usr/share/phpmybackup
Next go to Apache “conf.d” directory and create a file named “phpmybackup.conf” under it. For Red Hat based systems path should be (/etc/httpd/conf.d/) and for Debain (/etc/apache2/conf.d).
# vi /etc/httpd/conf.d/phpmybackup.conf [On RedHat based systems] # vi /etc/apache2/conf.d/phpmybackup.conf [On Debian based systems]
Append the following lines to it. Save and close. The below rules by default enable access to all, if you want to restrict the access to specific IP. Replace “all” with your IP address”. For example, the line should be “allow from 172.16.25.125“.
---------------- Apache 2.4 ---------------- Alias /phpmybackup /usr/share/phpmybackup <Directory /usr/share/phpmybackup> Require all granted </Directory> ---------------- Apache 2.2 ---------------- Alias /phpmybackup /usr/share/phpmybackup <Directory /usr/share/phpmybackup> Options None Order allow,deny allow from all </Directory>
Restart Apache service.
-------- (On Red Hat systems) -------- # systemctl restart httpd Or # /etc/init.d/httpd restart -------- (On Debian systems) -------- # systemctl restart apache2 Or # /etc/init.d/apache2 restart
On some systems, certain files must have write permissions for the file “global_conf.php” and for the “export” directory.
# cd /usr/share/ # chown -R root:apache phpmybackup (On Red Hat systems) # chown -R root:www-data phpmybackup (On Debian systems) # cd /usr/share/phpmybackup/ # chmod 0777 global_conf.php # chmod 0777 export
Now you are almost ready to start phpMyBackupPro. Navigate to the browser and load the config.php file like this.
http://localhost/phpmybackup/config.php OR http://ip-address/phpmybackup/config.php
In the configuration tab insert your MySQL details, like hostname, username, password and database name. If you would like to setup FTP to save backups, enter FTP login details as shown below.
Next, click on “backup” tab to see list of your MySQL database and select the database name that you wish to take backup.
Schedule backup has two popular ways to schedule backups:
- By including the schedule script into existing application.
- By using a hidden frame in a HTML frameset.
To schedule a backup, you must first create a schedule script. Go to “schedule backup” tab.
Select how often you want a backup to be generated. Then you have to choose the directory of that PHP script which will include the schedule script later. After that select the name of the database to backup, enter a comment, select compression type and finally click on “Show script” button. On the next page you will see the newly created schedule script.
Instead of copying generated code to new file, you can save the code by giving a filename like “schedule_backup.php” in the text box and click on “Save data” to save. For more information read “SCHEDULED_BACKUPS.txt” file under documentation directory.
The “sql queries” tab build to run simple sql queries to the databases or import databases from the local computer.
The “start” tab display your current Apache, PHP and MySQL version information.
phpMyBackupPro is by far the easiest backup solution for MySQL. If you are handling MySQL server, then pMBP is a must needed application that can help you to save your precious data with minimum effort.
5 thoughts on “phpMyBackupPro – A Web Based MySQL Backup Tool for Linux”
I tested phpMyBackupPro on 2 sites. One was using Joomla and the other was running with WordPress. I had to move these sites and wanted to use the cron-job scheduled backups via the php script (just for testing purpose). Worked like charme. I would suggest this tool for everybody who runs a php based website and does not want to struggle after a data loss.
I use SQLyog for this from ( http://www.webyog.com ). Its has powerful features. The free version is available here: https://code.google.com/p/sqlyog/downloads/list
Thanks for the description!
I still prefer phpMyBackuPro on my windows server.
I don’t use Linux. For Windows the best tool is a MySQL Dump ( http://www.devart.com/dbforge/mysql/studio/mysql-backup.html ) tool in dbForge!
Very useful, tx