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?
Wow... that was easy! I was trying to find out how to backup my databases with phpMyAdmin and did a quick "search for" in the php forum and I found this thread (awesome).
OK... I backed it up and it was super simple... Now the question... What if I lost my whole database (I hope I never do)... how would I re-install the file I saved back to my server?
Just cut and paste your XYZ.SQL into the text area that says " Run SQL query/queries on database YOUR_DATABASE_NAME " click GO and you should be in business.
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.
The BEST way to do it is with shell access using mysqldump.
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 .
I did the "browse" method and it worked like a charm. To test it I just created a new database... renamed the file to match the new database and uploaded it... PERFECT!
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.
Bookmarks