Restoring a Database - help needed

Started by Nixxi, January 14, 2016, 03:15:11 PM

Previous topic - Next topic

Nixxi

Hi all,

We recently lost our forum admin and board owner in sudden and tragic circumstances. Since then have been muddling through but unfortunately, our admin was the only person with knowledge of SMF and we are now having problems.

I'd also like to say that myself and one other person have been trying to fix things for many hours over a week - so, we have really tried - but lack the knowledge.

A mod was in the admin section when his computer crashed, and since then the forum has not been accessible. We managed to get a back up (from a time when the forum worked) from the hosts, but initially had no idea how to install it. The back up is in the webspace but we were unable to install it from PhpMyAdmin as it wouldn't let me browse to a file on the site. We don't have the ftp password.

I managed to install MySqlDumper which lets me get to the backup file, but can't install the backup as it keeps giving a fatal error.

I've also tried the Repair tool from this site. Two files have been dropped from the database, which seemed a good idea at the time, but subsequent reading indicates it wasn't.

So, I'm going around in circles. I know 200% more than last week, but not enough. I would be very grateful if someone could point me in the right direction.

Thanks in advance!

Nicola

Sir Osis of Liver

phpmyadmin will allow you to import a database backup from your local computer, not your website.  MySqlDumper will not help if your production db is damaged, you must import the host backup.  Have you tried repairing the db with phpmyadmin?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Nixxi

Apologies, forgot to say, we are using SMF 1.1.19

The uls is www.totherplace.co.uk [nofollow]

The Log in screen is available but after entering the login info the following error displays:

Database Error: Table 'totherplace_co_.smf_ban_groups' doesn't exist
File: /customers/9/4/5/totherplace.co.uk/httpd.www/Sources/Security.php
Line: 342

This refers to the dropped table but originally complained about the attachments folder.


Sir Osis of Liver

Why were the tables dropped?  Do you have the host db backup anywhere that you can d/l it to your computer?  Should be accessible via cpanel.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Nixxi

Quote from: Sir Osis of Liver on January 14, 2016, 03:26:50 PM
phpmyadmin will allow you to import a database backup from your local computer, not your website.  MySqlDumper will not help if your production db is damaged, you must import the host backup.  Have you tried repairing the db with phpmyadmin?

Hi and thanks. 

I don't have the ftp password.

In the Structure tab, I selected all the tables and chose "repair table".

Is there anything else that I could try?

Nixxi

Quote from: Sir Osis of Liver on January 14, 2016, 03:33:24 PM
Why were the tables dropped?  Do you have the host db backup anywhere that you can d/l it to your computer?  Should be accessible via cpanel.

The tables being dropped were a mistake.

Yes the host db backup is on the website. I managed to move it into the backup folder of SQLDumper, but couldn't use it for the reasons you explained.

Sir Osis of Liver

Do you know which tables were dropped?
Is your original db still in place?
Would appear you have access to your host cpanel.  If so, you should be able to reset the FTP password.
Where did your host put the db backup?  Can you get to it with cpanel file manager?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Nixxi

The original database is in place, but even before tables were dropped there were problems. As these occurred when a computer crashed, I wonder if it became corrupted.

I can't reset the FTP password as I don't have access to the email address - that went when the admin suddenly passed away. We know we are going to need to move, but just want to get the forum back until we can facilitate that.

Yes, I can get to the back up with file manager. Its in the "root"? - where settings.php is.

THank you very much for trying to help :)

Sir Osis of Liver

Use file manager to d/l the db backup to your local computer, then you should be able to import it from there with phpmyadmin.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Nixxi

Thanks, but the compressed file is too large - it's 200mb, which is over the limit.


Sir Osis of Liver

Does your cpanel allow you to restore a db backup?  It would be in the MySQL section.  You can also ask your host to restore the backup, most will do so.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Nixxi

Apologies if I'm not understanding you correctly - the only way I know to do restore a db backup is by importing it using the import function of phpmyadmin. This is what I tried at the very beginning, but was unable to do so due to the restrictions on the file size. I don't know of another way.

I will ask the Hosts. Thanks I didn't realise they would do this.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Quote from: Nixxi on January 14, 2016, 04:01:04 PM
Thanks, but the compressed file is too large - it's 200mb, which is over the limit.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori


Horatio Alger


Kindred

lol... now you missed it Illori...

Quote from: Nixxi on January 14, 2016, 03:27:57 PM
Apologies, forgot to say, we are using SMF 1.1.19

The uls is www.totherplace.co.uk
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Nixxi

There's bad news and .... a slight improvement.

Our hosts said that they could not install the back up for us and pointed us to a guide explaining how to do it via phpmyadmin. However, on checking we found that the compressed file size is actually 112mb - sorry, I don't know where I got 200mb from.

So I attempted to upload the backup and got the following error:

Error

SQL query:

CREATE TABLE `smf_attachments` (
`ID_ATTACH` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`ID_THUMB` int( 10 ) unsigned NOT NULL DEFAULT '0',
`ID_MSG` int( 10 ) unsigned NOT NULL DEFAULT '0',
`ID_MEMBER` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`attachmentType` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`filename` tinytext COLLATE latin1_general_ci NOT NULL ,
`size` int( 10 ) unsigned NOT NULL DEFAULT '0',
`downloads` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`width` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`height` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`file_hash` varchar( 40 ) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY ( `ID_ATTACH` ) ,
UNIQUE KEY `ID_MEMBER` ( `ID_MEMBER` , `ID_ATTACH` ) ,
KEY `ID_MSG` ( `ID_MSG` )
) ENGINE = MYISAM AUTO_INCREMENT =4707 DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci;

MySQL said: Documentation
#1046 - No database selected

The error message from the site is now:

8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
File: /customers/9/4/5/totherplace.co.uk/httpd.www/Sources/Load.php(198) : runtime-created function
Line: 3

Is it possible to help with this, please? It's meaningless to me :(




Nixxi

So, stabbing around in the dark, I know. I used File Manager to upload a new attachments folder and contents (from the back up) and tried to upload the backup again. This time the error message was slightly different:

Error

SQL query:

CREATE TABLE `smf_attachments` (
`ID_ATTACH` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`ID_THUMB` int( 10 ) unsigned NOT NULL DEFAULT '0',
`ID_MSG` int( 10 ) unsigned NOT NULL DEFAULT '0',
`ID_MEMBER` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`attachmentType` tinyint( 3 ) unsigned NOT NULL DEFAULT '0',
`filename` tinytext COLLATE latin1_general_ci NOT NULL ,
`size` int( 10 ) unsigned NOT NULL DEFAULT '0',
`downloads` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`width` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`height` mediumint( 8 ) unsigned NOT NULL DEFAULT '0',
`file_hash` varchar( 40 ) COLLATE latin1_general_ci NOT NULL DEFAULT '',
PRIMARY KEY ( `ID_ATTACH` ) ,
UNIQUE KEY `ID_MEMBER` ( `ID_MEMBER` , `ID_ATTACH` ) ,
KEY `ID_MSG` ( `ID_MSG` )
) ENGINE = MYISAM AUTO_INCREMENT =4707 DEFAULT CHARSET = latin1 COLLATE = latin1_general_ci;

MySQL said: Documentation
#1050 - Table 'smf_attachments' already exists

Advertisement: