Backing up phpMyAdmin

Associate
Joined
6 Mar 2009
Posts
495
Hi Guys,

I have been looking for an automatic backup solution for phpMyAdmin and wondered if you guys could help.

While researching i found a program call phpMyBackupPro, but dont no what this program is like. Could someone suggest a reliable way to have automatic backups of the database.

I am currently running my in-house website on a windows 2003 server box if that helps.

Thanks
 
Soldato
Joined
3 Jun 2005
Posts
3,119
Location
The South
So you're wanting to backup your local MySQL DB's?
If you have local access to MySQL then have a look at the command-line utility 'mysqldump' (The Geek Stuff guide) which will allow to your export/dump your MySQL databases to sql file format. If you wanted to automate that process then you could use the Task Scheduler to execute the mysqldump command at a certain time/day/date etc.
 
Associate
OP
Joined
6 Mar 2009
Posts
495
Ok thanks i will look into this:)

I do an entire backup image of the server every night, does this also backup the database?? I have phpmyadmin installed on that server btw.

Cant seem to locate the database files on the server anywhere, probably just looking in the wrong place.

Thanks
 
Associate
OP
Joined
6 Mar 2009
Posts
495
AS_Platium, found the location of the Database now. Thanks

As i said before there is a backup done every night with symantec backup exec. So if i backed up the files using this would that be enough or would i be better using something else?

Cheers
 

fez

fez

Caporegime
Joined
22 Aug 2008
Posts
25,806
Location
Tunbridge Wells
I have no idea what symmantec backup does or how it backs up the databases but there is every chance that it is simply backing up to an image of the server which isn't that much use if you just want to pull the dbs.

Personally I always do a backup using mysqldump to ensure that I get all the databases and data.

Should run something along the lines of mysqldump -u username -ppassword database_name > filename_to_export_to.sql

That needs to run outside of the mysql prompt but it is crazy quick to use. To reverse it, simply do mysql -u username -ppassword database_name < filename_to_import_from.sql
 
Associate
OP
Joined
6 Mar 2009
Posts
495
Fez, thanks for the info.

Should run something along the lines of mysqldump -u username -ppassword database_name > filename_to_export_to.sql

Could you run something like that in a.bat file and have it added in windows scheduler and use that as a scheduled backup??

Thanks
 
Soldato
Joined
3 Jun 2005
Posts
3,119
Location
The South
As mentioned, you can use the Task Scheduler to automate it. And yes, you could stick it in a batch/power script and then get Task Scheduler to execute that, although unless you're wanting to do something 'funky' with database(s) exports you can just stick the complete command line in the Task Scheduler execute field.
 

fez

fez

Caporegime
Joined
22 Aug 2008
Posts
25,806
Location
Tunbridge Wells
If you need to backup an entire server, you can also use the --all-databases flag as well and omit the table before the ">". If you have 20 or 30 dbs to backup which don't need to be separated this is a good time saver. Bear in mind it could be a monstrous file as all dbs go into a single .sql file.
 
Back
Top Bottom