SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Dumping MySQL
-
Dec 15, 2001, 19:10 #1
- Join Date
- Feb 2001
- Posts
- 136
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Dec 16, 2001, 10:31 #2
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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?I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Feb 14, 2002, 13:49 #3
- Join Date
- May 2000
- Location
- San Diego, CA
- Posts
- 463
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(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?
Thanks in advance...
-
Feb 14, 2002, 14:37 #4
- Join Date
- Mar 2001
- Location
- USA, Philadelphia
- Posts
- 206
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
cd pub \r; more beer
Eddie
-
Feb 14, 2002, 14:50 #5
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(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.
The BEST way to do it is with shell access using mysqldump.I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Feb 14, 2002, 14:54 #6
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh and eddie, you don't need to cut and paste, just hit the browse button and select the .sql file from your harddrive. But mysqldump is much better
I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Feb 14, 2002, 15:05 #7
- Join Date
- Mar 2001
- Location
- USA, Philadelphia
- Posts
- 206
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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 .
cd pub \r; more beer
Eddie
-
Feb 14, 2002, 15:12 #8
-
Feb 15, 2002, 14:20 #9
- Join Date
- May 2001
- Location
- Channel Islands Girth: Footlong
- Posts
- 5,882
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by eddiembabaali
Out of curisity does anyone know the query executed to create a dump(schema)?I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
-
Feb 15, 2002, 14:31 #10
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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 .
Sketch
Bookmarks