• Welcome to Simple Machines Community Forum. Please login or sign up.
January 25, 2022, 12:46:48 AM

News:

Join the Facebook Fan Page.


Backing up sql database

Started by PenelopeQ, August 19, 2011, 02:41:12 PM

Previous topic - Next topic

PenelopeQ

The power company is about to shut the power down--an about an hour--for 3 hours and so I thought I'd better post now.

Since I'm having problems with a table in my db that the upgrade.php is stuck on and some errors and my db repair says does not exist, I thought I would make another backup of my db and try to stop the upgrade.php task so that I can get my forum off of maintenance mode while I troubleshoot the issue with the missing table.

I have a db backup and maybe it is okay. But I don't understand or know what to do with it. It is in wordpad and I cannot open it. I made that therough phpMyAdmin about 2 or 3 days ago.

So I made a backup through my cpanel's backup function and unzipped it--it is the same document in wordpad.
The file is zipped name.sql.gz

So I just tried again, this time following these instructions http://wiki.simplemachines.org/smf/How_do_I_save_the_database_data
This time the file is name.sql.zip and winzip cannot open it at all. It says it does not appear to be a valid archive.

So maybe everything is fine and the wordpad document works. But can you tell me how? If I lose my db, how do I restore it with that?


And once that is done, how do I replace a missing table--a table which I can see in the list of tables? I know there is a create a table wizard, but I don't know what to put in it. Recreating from scratch seems like it would be well beyond my skill level.

Thanks

Illori

sounds like your backup attempt was not downloaded completely. try doing it again.

the .gz file needs to be unarchived with a program like winrar or similar before opening it with notepad or other text editors. also wordpad is not one of the recommended programs to use. try notepad++.

PenelopeQ

Okay, is winrar a program I need to find and download?

As for notepad versus wordpad. I always choose notepad and don't use wordpad. But this just came this way and it looks like the wordpad icon--I had to go look up wordpad to see if that was it since it doesn't look like notepad. The icon looks like a little lined notebook.

I retried the attempt a few times--same results.

I know it is just me not understanding, but I can't imagine how all of those tables can be saved in a simple text file. Can I just choose to open the file with notepad instead of wordpad? As I said, I do have a copy, I have simply been skeptical about it since it's in a text editor and thought I'd try other routes to backing up.

Thanks

Oh, I made a copy and tried to poen in notepad and got the same message--it is too large, try another editor file. But maybe that's okay since it's probably not meant to be opened from there, only stored.

Thanks

Illori

yes you would need to download winrar, and is said notepad++ not notepad.

PenelopeQ

Okay, what is notepad++? Is it a newer or more advanced version of notepad and how do I get it--is it expensive?

Thanks

Power's about to go off for a few hours, so I'll look up winrar when it's back.


PenelopeQ

Okay thanks. My power just came back and I will check out those links.

But now that I'm back online, how can I remove maintenance mode for my forum?

Illori

if you can access the admin panel under server configuration


Illori

can you not log in to your forum?

PenelopeQ

How do I do that when it is in maintenenace mode. I'm sure as the admin I can do something; I just don't know what or how.

Illori

if you put it in maintenance mode from the forum you should be able to log back in, otherwise open up settings.php and read it, it tells you how to disable maintenance mode.

PenelopeQ

August 19, 2011, 06:39:33 PM #12 Last Edit: August 19, 2011, 06:44:11 PM by PenelopeQ
I did not put it into maintenance mode from the forum; I was starting to run upgrade.php but that process got stuck backing up the tables because it reached a table that apparently does not exist and would not go beyond that step.

As for settings, all that says is
Quote from: settingsMaintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$mtitle = 'Maintenance Mode';      # Title for the Maintenance Mode message.
$mmessage = '';      # Description of why the forum is in maintenance mode.

##########

could I just continue with upgrade.php--start-over--and not check for it to back up the db--since I have made a backup copy?
but maybe there is antoher issue. I've been trying to open my db backup with notepad++ and it locks up every time.

Illori

check the very bottom of the file for $maintenance = 0;   

PenelopeQ

Thanks, I found it just before your reply and disbaled maintenance mode. What a relief, my forum is up and running.

But what that means is I have not resolved anything since getting the errors that started a few days ago. I can now put the forum in maintenance as needed while troubleshooting.

The table log_search_words does not exist. I can see it, but clearly something is wrong. upgrade.php got stuck on it. my sql database  ...something new...the backups that were made stopped at log_search_words, but now when I check it made a back up of that table but no backups of tables after it in the list. And when I look for that backup table...I cannot find it in phpMyAdmin--though I can find the original that is supposedly non-existent.

That same check listed the origina version as not in existence.

So then I ran the repair fuction in mysql databases. The backup for that table said "the storage engine for the table doesn't support repair and the original table was listed as not existing.

So my questions


  • Since the table doesn't exist, how do I recreated it?
  • In particular, how do I recreate it when I can already see it in phpMyAdmin?
  • Running upgrade.php put a lot of backed up tables in my phpMyAdmin, can I safely just delete those extras?

Angelina Belle

Seems like something is so wrong with this table that it causes a problem with backup, with SMF, with phpMyAdmin fixing it.
It is hard to know what caused this.  I don't know what is meant by "storage engine for the table" and "original table was listed by not existing".

What I don't know is whether anything bad would come of just deleting that one table and recreating it
DROP TABLE IF EXISTS `smf_log_search_words`;

CREATE TABLE `smf_log_search_words` (
  `ID_WORD` mediumint(8) unsigned NOT NULL default 0,
  `ID_MSG` int(10) unsigned NOT NULL default 0,
  PRIMARY KEY (`ID_WORD`, `ID_MSG`)
) TYPE=MyISAM;

Let me see if I can find someone to offer an opinion on this.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

PenelopeQ

Sorry, this is solved. It was aon a few different threads over a few days--no one was responding after a few days of nothing if I then updated a thread, so I started a new one instead.

Angelina Belle

Oh! I see now that you got to the solution at http://www.simplemachines.org/community/index.php?topic=447710.msg3145834#msg3145834, with a little help from K@ and illori.

Thanks for marking this solved, now, and I'm glad you figured that one out.  A bit tricky. That table gets awfully big!
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Advertisement: