Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Tristan Perry on June 04, 2005, 04:39:01 PM

Title: restore_backup.php problems..
Post by: Tristan Perry on June 04, 2005, 04:39:01 PM
Hello,
I'm trying to restore a 100 megabyte database onto my test server's version of SMF. When running the restore_backup.php file, everything is fine, apart from the messages and members tables; which render many errors. Below are a few errors that are shown:

QuoteSome of the queries were not executed properly. Technical information about the queries:
Line #32984: BLOB/TEXT column 'personalText' used in key specification without a key length
Line #x: Table 'smf.yabbse_members' doesn't exist
Line #34299: BLOB/TEXT column 'subject' used in key specification without a key length
Line #x: Table 'smf.yabbse_messages' doesn't exist

The "Table 'x' doesn't exist" errors are shown about 100 times each. I'm running PHP 4.3.11 and MySQL 4.1.12 on my test server. Edit: Oh, and I'm using create_backup.php to create the backup. The server where I get the backup from is running MySQL 4.0.24.
Any help would be appreciated,
Tau Online
Title: Re: restore_backup.php problems..
Post by: [Unknown] on June 04, 2005, 09:00:05 PM
Are you sure you're using the latest versions of the two tools?

I haven't actually released them as stable yet, mind you.

The two errors are probably faily easy to fix, and the rest are caused by those two:

Line #32984: BLOB/TEXT column 'personalText' used in key specification without a key length
Line #34299: BLOB/TEXT column 'subject' used in key specification without a key length

To fix them, assuming it was an old create_backup.php or a different version of MySQL, find:

(personalText)

Replace:

(personalText(30))

Find:

(subject)

Replace:

(subject(30))

Each should be on or very near the specified lines.

-[Unknown]
Title: Re: restore_backup.php problems..
Post by: Tristan Perry on June 05, 2005, 06:49:00 AM
Hmm.. Thanks. Using the new files, the only error shown was a PHP notice which isn't really important:

QuoteNotice: Undefined index: line in C:\Program Files\Apache Group\Apache2\htdocs\SMF\restore_backup.php on line 191

Although same problem as last time- Comparing the two databases everything after log_topics seems to not have been restored.. So I make the changes you mentioned above, and now get:

QuoteSome of the queries were not executed properly. Technical information about the queries:
Line #23395: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(30) NOT NULL default '',
`gender` tinyint(4) unsigned NOT NUL
Line #x: Table 'smf.yabbse_members' doesn't exist
Line #24746: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(30)
`posterName` tinytext NOT NULL default '',
`posterEmail
Line #x: Table 'smf.yabbse_messages' doesn't exist

The odd thing with this is that, now, all tables have been fully restored, apart from the members and messages tables- which have been deleted and so SMF won't open ("Table 'smf.yabbse_members' doesn't exist") The key lengths are there which is what is confusing me.

I realize these files aren't stable yet, and so I appreciate the help lots but if the errors can't be easily fixed, I fully understand  :)
Title: Re: restore_backup.php problems..
Post by: [Unknown] on June 06, 2005, 04:33:17 AM
Those weren't the changes I meant :/.

Can you email me the dump?

-[Unknown]
Title: Re: restore_backup.php problems..
Post by: Tristan Perry on June 06, 2005, 01:48:33 PM
Quote from: [Unknown] on June 06, 2005, 04:33:17 AM
Those weren't the changes I meant :/.

Can you email me the dump?

-[Unknown]
Oh right..  :-[ I'd be happy to e-mail you the file (To '[email protected]' ?) although it's 26 megabytes when gz-zipped, and 80 un-zipped just to let you know. Should I still send it? [The zipped one]
Title: Re: restore_backup.php problems..
Post by: [Unknown] on June 07, 2005, 06:17:43 AM
Yes, that's fine... I'll take a look at what might be wrong.

-[Unknown]
Title: Re: restore_backup.php problems..
Post by: Tristan Perry on June 07, 2005, 01:55:07 PM
Quote from: [Unknown] on June 07, 2005, 06:17:43 AM
Yes, that's fine... I'll take a look at what might be wrong.

-[Unknown]
Ok thanks a lot  :) I'm e-mailing you it know... By the way sorry about the first e-mail, I forgot to attach the file  :-[
Title: Re: restore_backup.php problems..
Post by: [Unknown] on June 07, 2005, 08:33:08 PM
I only received one email with no attachment.

If you can't send that large an attachment, what about restoring those tables that work fine (not members and messages, yes?) and then trying to (with a copy of the backup!) strip out the data for the other tables (like log_topics, topics, personal_messages, etc.) - maybe that would make it small enough?

-[Unknown]
Title: Re: restore_backup.php problems..
Post by: Tristan Perry on June 08, 2005, 11:58:32 AM
Quote from: [Unknown] on June 07, 2005, 08:33:08 PM
I only received one email with no attachment.

If you can't send that large an attachment, what about restoring those tables that work fine (not members and messages, yes?) and then trying to (with a copy of the backup!) strip out the data for the other tables (like log_topics, topics, personal_messages, etc.) - maybe that would make it small enough?

-[Unknown]
Ok thanks, I'll try stripping out the data. I have definately sent both and so it's probably because of the size of the attachment that the e-mail wasn't sent properly. One final question: What program do you use to open databases? Using Word is too slow and crashes my PC, notepad works about 50% of the time, although crashes my PC the other half of the time..
Title: Re: restore_backup.php problems..
Post by: Tristan Perry on June 08, 2005, 04:11:33 PM
I just got an un-delievered mail message. It appears your inbox is full?

QuoteThis message was created automatically by mail delivery software.
A message that you sent has not yet been delivered to one or more of its
recipients after more than 24 hours on the queue on monkey.lewismedia.com.

The message identifier is:     [Edited]
The subject of the message is: [Edited]
The date of the message is:    Tue, 7 Jun 2005 18:54:28 +0100

The address to which the message has not yet been delivered is:

  [email protected]
    Delay reason: mailbox is full

No action is required on your part. Delivery attempts will continue for
some time, and this warning may be repeated at intervals if the message
remains undelivered. Eventually the mail delivery software will give up,
and when that happens, the message will be returned to you.
Title: Re: restore_backup.php problems..
Post by: [Unknown] on June 08, 2005, 06:27:26 PM
Interesting.  I thought it was set so my box couldn't be full :P.

Anyway, I would use a text editor.  A good one for large files is UltraEdit.

-[Unknown]
Title: Re: restore_backup.php problems..
Post by: sifirforum.com on February 19, 2006, 03:12:15 AM
i have this error:

QuoteUndefined index: line in /home/..../forum/restore_backup.php on line 191
Title: Re: restore_backup.php problems..
Post by: JayBachatero on February 19, 2006, 03:17:01 PM
Try using the one on this post.
http://www.simplemachines.org/community/index.php?topic=18350.msg168327#msg168327
Title: Re: restore_backup.php problems..
Post by: Dorte on March 17, 2006, 11:20:20 AM
Hi!
I tried moving my SQL data with create_backup and restore_backup. Backuping went wonderfully, but when restoring I got this message:
"Some of the queries were not executed properly. Technical information about the queries:
Line #1: Query was empty"

Any idea what went wrong?
Title: Re: restore_backup.php problems..
Post by: JayBachatero on March 17, 2006, 06:33:35 PM
Did you modify any of the tables?
Title: Re: restore_backup.php problems..
Post by: Dorte on March 18, 2006, 06:48:27 AM
Not that I know of, I don't really have a clue about SQL and all that sort of stuff which is why I chose SMF ;) it's so wonderfully automatic...
Title: Re: restore_backup.php problems..
Post by: ~Romil on December 19, 2006, 09:33:37 AM
Hi, sorry to have bumped this old thread, but isnt it supposed to address those restore_backup.php issues?

Well, I took two backups of my Joomla bridged SMF, one via phpMyAdmin and one using [Unknown]'s backup utility. Both of them render this error on the stage3:

Notice: Undefined index: line in /home/mediacra/public_html/arpsshillong/forum/restore_backup.php on line 181
[color=red]Some of the queries were not executed properly. Technical information about the queries:[/color]
Line #1718: Invalid default value for 'logTime'
Line #1726: Table 'mediacra_smf.smf2_log_online' doesn't exist


The earlier installation was SMF RC 1.1 and trying to do it over SMF 1.1, and haven't touched the db as such. Any ideas?
Title: UPDATE
Post by: ~Romil on December 19, 2006, 09:56:47 AM
I fixed the 'TIMESTAMP' issue, and restored the .sql file using restore_backup, it was a success there.

But, cant see restored posts and topics on live forum? What could be the problem?
Title: Re: restore_backup.php problems..
Post by: ~Romil on December 20, 2006, 06:39:40 AM
Sorry for being impatient, but retried everything and got success message but still those forum posts dont appear. But, when I see the db with myPHPAdmin, the db is there allright. (www.arpsshillong.com/forum)

Do I have to run any update on the version numbers for SMF 1.1? Earlier installation was SMF 1.1 RC1 with Joomla bridge. Please suggest.
Title: Re: restore_backup.php problems..
Post by: Orstio on December 20, 2006, 07:12:55 AM
You can't use a SMF 1.1 RC1 database backup on a SMF 1.1 Final forum.  There have been too many changes for that to work.

Do you still have a backup of the SMF 1.1 RC1 files?
Title: Re: restore_backup.php problems..
Post by: ~Romil on December 20, 2006, 07:16:40 AM
Ya I do have all the installation intact in form of your bridged version.

BTW, I was trying this installation on SMF 1.1 and in the meantime, SMF 1.1.1 got in picture. Please suggest...
Title: Re: restore_backup.php problems..
Post by: Orstio on December 20, 2006, 07:22:36 AM
Reupload your SMF 1.1 RC1 files to match your SMF 1.1 RC1 database.

Make sure everything functions as it should.

Then upgrade to SMF 1.1.1.
Title: Re: restore_backup.php problems..
Post by: ~Romil on December 26, 2006, 06:25:44 AM
Before you adviced, I rather tried to upgrade the SMF 1.1 RC1 to 1.1.1 on original installation, it worked fine!

Now, I took a backup of the db there and saved it with removing the 'TIMESTAMP' issue.

Installed a fresh SMF 1.1.1 on another server and when uploaded the db I had in my hand, but strangely the posts still don't appear?

Any ideas, before I take a U turn to what Orstio suggested?
Title: Re: restore_backup.php problems..
Post by: sifirforum.com on December 27, 2006, 05:03:41 PM
when you optimeze tables before backup then restore proses runs perfect.

and mysql version is important. mysql 5 is not good for smf.
Title: Re: restore_backup.php problems..
Post by: BigGunn on January 17, 2007, 04:31:45 AM
i lost all of my threads and posts because of a "duplicate entry" error.

argh.
Title: Re: restore_backup.php problems..
Post by: SleePy on January 17, 2007, 06:38:29 PM
You should have an empty database or have your mysql file empty it before you add everything back.
Title: Re: restore_backup.php problems..
Post by: Han on January 21, 2007, 10:14:50 PM
When there is an update of the forumsoftware, can I than still use my old "create_backup.php" and "restore_backup.php" or will there be new versions of this two files as well?

I never used the "create_backup.php" and "restore_backup.php" files before. I always used phpmyadmin. I'm just curious how this works.
For restore in PHPMyAdmin I always had to cut my sql-file in pieces. If I don't do that, the server of my host times out on me. Cutting my sql-file in pieces is quite a job, so I wonder if backup and restore with "create_backup.php" and "restore_backup.php"  is easier for me.
Title: Re: restore_backup.php problems..
Post by: Han on February 21, 2007, 07:42:40 PM
Not one, who knows an answer?
Title: Re: restore_backup.php problems..
Post by: SleePy on February 22, 2007, 09:23:03 PM
I never used restore_backup and phpmyadmin has never gave me much trouble when I do use it which is seldom.

Did you try any and get it working?
Title: Re: restore_backup.php problems..
Post by: Han on April 18, 2007, 04:44:18 AM
I'm sorry for not answering. I lost track of this topic.

No, I did not try it, because i do not want to temper my database if not nessesary. My host has now a backup and restore system. I can make backups online and I keep a backup on my own harddisk. I don't need it "restore_backup.php" anymore.
Title: Re: restore_backup.php problems..
Post by: babjusi on May 29, 2007, 12:22:14 PM
How exactly those 2 files work? Sorry for this newbe question, but I can''t quite understand it.

Create_backup.php- This file should be uploaded to the webroot so it can make a back-up of database?  And the other file, restore_backup.php should be again uploaded to the webroot so it can restore the database? Did I get it right so far?

My other question is, after I upload, say, Create_backup.php to the webroot, what else should I do? Do I have to type s.th. to the broweser like. www.mysite.com/Create_backup.php and run it. Or should I do s.th else? All help is very much appreciate it. Thank you in advance for all your answers

Title: Re: restore_backup.php problems..
Post by: greyknight17 on May 29, 2007, 10:52:55 PM
Quote from: babjusi on May 29, 2007, 12:22:14 PM
How exactly those 2 files work? Sorry for this newbe question, but I can''t quite understand it.

Create_backup.php- This file should be uploaded to the webroot so it can make a back-up of database?  And the other file, restore_backup.php should be again uploaded to the webroot so it can restore the database? Did I get it right so far?

My other question is, after I upload, say, Create_backup.php to the webroot, what else should I do? Do I have to type s.th. to the broweser like. www.mysite.com/Create_backup.php and run it. Or should I do s.th else? All help is very much appreciate it. Thank you in advance for all your answers


You can upload it wherever you want. It will just be going after the database either way. It will prompt you to enter the login info and the database info. After that, depending on which file you are using, it will restore or backup your database.

I never use these two files either. I remember trying one of these out myself before and didn't work out quite as planned. Had to contact my webhost and everything was peachy after that ;)