News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

export and import database

Started by webrp, July 29, 2009, 11:52:29 AM

Previous topic - Next topic

webrp

Hi,

I am attempting to migrate a SMF forum from server A to Server B. I dont have Server A access but have admin account of forum.

I login into SMF frontend with admin account, and go to "backup database".

Then when I try to import this database to my new server, using phpmyadmin, I am having some errors and import is not done.

Since I am pretty newbie with smf, my question is if the backup can be done from forum admin account, and not from the phpmyadmin.

any help?

Tyrsson

You can backup from the admincp but you can not restore a backup from the admincp. You will need to import that backup in phpmyadmin.

How large is the backup file?
What errors were given while trying to import the backup via phpmyadmin?
PM at your own risk, some I answer, if they are interesting, some I ignore.

babjusi

Quote from: webrp on July 29, 2009, 11:52:29 AM
Hi,

I am attempting to migrate a SMF forum from server A to Server B. I dont have Server A access but have admin account of forum.

I login into SMF frontend with admin account, and go to "backup database".

Then when I try to import this database to my new server, using phpmyadmin, I am having some errors and import is not done.

Since I am pretty newbie with smf, my question is if the backup can be done from forum admin account, and not from the phpmyadmin.

any help?

How large is your forum? For bigger forums is not recommended the backup option from the acp.

What errors did you get when trying to import the db at the new host? Did you check the db copy if it is complete?

For more info on exporting/importing the db, have a look at the last link in my signature.

webrp

#3
hi, thank you for replies, but I have new clues:

-I made again the import (from phpmyadmin) on a second server, and the import is made with success. -

-The phpmyadmin settings for import are exactly the same, between my 2 servers (encoding, etc). But mysql/php versions are different (PHP5.2.8/MySQL4.1.22-standard and PHP5.2.9/MySQL   5.0.81community)

-The server where I need to import database, with the latest versions,  is giving me this error:
Error

SQL query:

CREATE TABLE `smf_log_digest` (
id_topic mediumint( 8 ) unsigned NOT NULL default '',
id_msg int( 10 ) unsigned NOT NULL default '',
note_type varchar( 10 ) NOT NULL default 'post',
daily smallint( 3 ) unsigned NOT NULL default 0,
exclude mediumint( 8 ) unsigned NOT NULL default 0
) TYPE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'id_topic'



Any Ideas how to workaround this issue?

babjusi

Change:

id_topic mediumint( 8 ) unsigned NOT NULL default '',

to:

id_topic mediumint( 8 ) unsigned NOT NULL default '0',

webrp

I edited the backup file, and change that line.
Now I am having a slightly different error message:
Error

SQL query:

CREATE TABLE `smf_log_digest` (
id_topic mediumint( 8 ) unsigned NOT NULL default 0,
id_msg int( 10 ) unsigned NOT NULL default '',
note_type varchar( 10 ) NOT NULL default 'post',
daily smallint( 3 ) unsigned NOT NULL default 0,
exclude mediumint( 8 ) unsigned NOT NULL default 0
) TYPE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'id_msg'

webrp

Ok, after some more attempts I got this working.

I did the import to the server with older mysql/php version, with success.
I made an export.

I made the import to the server with most recent mysql/php versions (wich gives error when importing from the original database file exported from SMF forum administration)

Sucess!

babjusi

Glad to hear that. Enjoy your Smf forum :)

Advertisement: