The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Dumping MySQL

I love backups, gotta have backups, cant sleep at night without backups so has anybody ever tried the following or have any suggestions on how to achieve this :

I have a web host that very nicely provides me with ZIP format backups of the site, the problem is 90% of my site is database driven and the contents of the database is not included in the backup. So if MySQL dies so does my site

What I want to do is setup a cron job to dump the contents of the database to XYZ.SQL and then email that file to me.

I have seen this "dumping" facility in PHPMYADMIN, and I have spent the last few hours trying to decifer how it works to no avail

DB dumping in phpmyadmin is fairly simple. On front page of your DB simply go to "View dump(schema)" click the structure and data radio button and check the send and complete inserts checkboxes and hit go. This will download an .sql file to your HD.

As for setting it up on a cron job and email the files, pass. I tend to just go in once a week ish and dump the DB manually -- I have 5 and it only takes 10 mins or so. My host also backs up the DB daily -- have you tried contacting them to find out how they back up the DB's?

The only thing I would say that dumping via phpmyadmin is not always reliable. I recently had to switch hosts, did the dump from phpmyadmin on old host, and upload to new host via phpmyadmin and one of them didn't like it.

I host my sites with different hosts and one of them still uses the old phpmyadmin that does not support browsing for files. I guess if his host does then so much the better for him. Out of curisity does anyone know the query executed to create a dump(schema)? I just hate clicking away without knowing whats going on .

Originally posted by eddiembabaali I host my sites with different hosts and one of them still uses the old phpmyadmin that does not support browsing for files. I guess if his host does then so much the better for him. Out of curisity does anyone know the query executed to create a dump(schema)? I just hate clicking away without knowing whats going on .

You know you CAN download and install the new phpMyAdmin yourself and install it. It's just a bunch of PHP files. You'll have to add some kind of password protection, maybe through .htaccess, but you can do it.