mysql database backup How do I do it right?

Discussion in 'Software' started by mag00, Jun 4, 2006.

  1. mag00

    mag00 Sergeant

    I have a backup of some sort on my desktop, but I don't know if it will be good to re-instate a database should I get troubles.

    I would like to know the correct procedure for backing up, then I will start with the database conversion.

    I'm pretty sure I can do the conversion without incident, but pretty sure isn't a good habit to work off of.
    :eek:
     
  2. TheDoug

    TheDoug MajorGeek

    Click on DB name in left pane.
    Click on Export tab in right pane.
    Select Structure and Data.
    Click Select All.
    Check Save As File. (Zipped switches may or may not work.)
    Press Go.
    Specify a filename that includes DB name, date and time preferably. Retain the .sql extension.

    Depending on what kind of conversion you're doing, you may alter the structure of tables in a way that may not allow you to restore from the saved .sql file you just made.
     
  3. mag00

    mag00 Sergeant

    If you want the whole story, I could tell ya.

    But if I have a clean backup, like it sounds I might already, then I should be able to get that back into a new database, with same tables right?

    I have been reading about cvs etc, but do not comprehend. In one of the panels, I have a choice of saveing for exel, mysql cvs etc. So saving in mysql is best I presume, and my backup on the desktop has the .sql extension.

    If I open it, all the recipes are there, which is the important stuff to me, email addys too, are there. But to restore the forum to somewhat close using a different forum software is the final goal.

    I will try one last time to fix the first forum config, and then I will give converting to pbpbb a try. (see my other post b.override_theme)

    On a lighter note, I am really liking messing around inside the database. This is where it all happens. Of course script language might be alot of fun too, but once I understand the database, I should be able to query and write in a fashion I like. Probably take a few years, but I'm encouraged.
     
  4. TheDoug

    TheDoug MajorGeek

    Oh, you're migrating to a new forum. Well, that will end up being a best-effort on the part of the converter anyway. It's just going to query the current DB, glean what it can, and create its own, no? It shouldn't alter or delete the old forum DB.
     
  5. mag00

    mag00 Sergeant

    Thanks much, did about five different backups, using different formats.

    On the the next hurdle
     
  6. mag00

    mag00 Sergeant

    Wasn't paying attention, and missed that last post of yours.

    I think that is what the converter does. I am told to remove the converter after the conversion. I have even humored adding the data manual to the database as there are only 200 posts and 8 users. But I would only keep the recipes. http://zywie.com/smf/smf/index.php

    One thing though is I think I have to have the phpbb installed using the smf database, I don't know why and I may try a database to data base conversion first. But looking at the php text, I don't see where it calls to a different database. I do see where it would call to the smf_table. But I am new to all this, so what do I know ?

    Converter file is at convert_smf.txt

    As a person who likes to fix things, I would still like to see this forum work again, just so I can say I fixed it. Then "migrate" to the other forum platform.

    Then see if I can separate or set up a new database with my backup, (just for practice). I found an easy way to delete tables by experimenting :D

    Doug, how long have you been doing this kind of stuff? It does get easier right?
     
  7. TheDoug

    TheDoug MajorGeek

    I have a phpBB forum and some php-nuke sites with BBtonuke forums for a few years.

    The installation of phpBB will create its own database. The converter will query the smf DB and load the values appropriately into the phpBB DB. The converter looks like it's written for phpBB 2.0.18. The latest phpBB is 2.0.20, so you may have to install 2.0.18, migrate the data, and then upgrade to 2.0.20. In any case I recommend staying current with the latest phpBB releases after you get up and running.
     
  8. mag00

    mag00 Sergeant

    I'm running a thread on the phpbb site also. The writer of the converter script has responded in that thread. He says to have the smf and phpbb in the same database for the conversion.

    What I would like is to send the smf tables into the new phpbb database, leaving the original intact. It is said to be easiest to copy the tables over, vs export import, neither of which I know how to do.

    I'm thinking of writing a step by step with screenshots for other novices.
    Then post over on the phpbb site.

    So I didn't see a copy tables function in phpmyadmin. What is a proper way to export import. I hear some talk about ucs ?
     
  9. TheDoug

    TheDoug MajorGeek

    I read the thread over at phpbb.com. Install phpBB. Go into phpMyAdmin, and click on the DB it created in the left pane. You should see all the tables for it in the right. Click the SQL tab in the right pane. Use the Browse button to navigate to the saved smf .sql file on your desktop. Hit Go, and all the tables from the saved smf .sql file will be created and loaded with their saved data inserted into them in the phpBB DB. The phpBB tables will not be affected-- well, there should be no problem if none of the smf tables have names identical to any phpBB tables anyway-- and there shouldn't be, but make sure... Once the conversion is finished, you can drop the smf tables from the phpBB DB.

    UCS-- the convertor file you posted above is used with some Unversal Convertor or somesuch at phpbb-- it doesn't appear to be functional on its own.
     
  10. mag00

    mag00 Sergeant

    I have the phpbb installed, it was a sweet install btw. A clean database for it and then I have the smf on its own database. I will try the browse, and see how it goes. I'm going to take screenshots as I go from both forums. Run the shots into photoshop etc. It helps (in a tutorial) alot to see the panels.

    LOL, I was just thinking about the thread at smf, I had to sign up with a second user name after my first go round with them. Cracks me up. The smf forum, could be a good platform, but I think something is amiss at their little paradise. And even with a second account, the same ole keeps happening. You would think the help forum on the smf site would have all kinds of info and help about their forum software.

    I have been trying to get my smf back running since I blew it out in mid april.

    But for a fee you can be a charter member (at smf) and get expedited help. Heck for a little less I can run vbulliten and get support, (after the initial license)

    I really liked the theme enterprise in the smf1.1rc2 version. That is where all my trouble began however.

    I had godaddy value application of smf1.0.5 beta installed with my hosting at godaddy. But when they set up the data base, it wasn't set up where I could get to it to administrate it. While trying to change themes, I changed the file paths in the smf admin, and that was it. I couldn't get permission to access the database to reset the paths with the use of the repair_setting.php.

    It took over a month to get godaddy to send my files to the new database I had setup for a new install of the 1.0.5 smf. Another saga.

    I changed the table prefix in the php script to find the old files in the new database.( pictured above) upgraded smf to 1.0.7 and then the boverried_themes error aaargh?
    The supposed fix for that blew out my session table somehow.

    That brings me to now, except for interactions on the smf board lol, at least I can laugh about it a little. I don't think they found my sense of humor very funny.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds