Uutiset:

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

Main Menu
Advertisement:

Upload Backup?

Aloittaja moraidh, huhtikuu 05, 2011, 04:25:21 IP

« edellinen - seuraava »

moraidh

I have changed domains and want to change the location of my forum, so i have just installed the latest version of SMF there.

How do I get the database backup I have downloaded of my old forum uploaded into my new one?

(I have only downloaded hte b/u from within SMF, not via MySQL)

Illori


moraidh

Thanks Ilori,

But do I have to export the old database via MySQL in the old domain first, or can I use MySQL to import what I backed up via SMF??

Illori

i would recommend you backup from phpmyadmin as sometimes the backup in smf admin panel does not backup everything.

moraidh

But won't that back up all the files from what is an outdated version of SMF, so when I try to back up, my latest version will be written over?

Illori

no phpmyadmin will just backup your database, as your files are not stored in your database.

How do I backup my database?

moraidh

OK, I saved an SQL database using phpMy Admin of my old forum.

My new domain already has a database created, when I installed the newest version of SMF on it.

I tried importing the SQL d/b using the new domain's phpMyAdmin and got an error becuase it had a different db name.  I opened up the db and changed all instances of the old name to that of the new one, and got the following message:

Error

SQL query:

-- phpMyAdmin SQL Dump
-- version 2.9.1.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 22, 2011 at 09:59 PM
-- Server version: 3.23.58
-- PHP Version: 4.4.7
--
-- Database: `newname`
--
CREATE DATABASE `newname` ;

MySQL said: Documentation
#1007 - Can't create database 'newname'; database exists 


Thing is, I read the link you gave, and I can't change the name of the databse my host gave me.  Am I stuck??

Illori

remove the line create database `newname`; from the file.

moraidh

Ok thanks,

Now I get this!

Error

SQL query:

--
-- Dumping data for table `phpbb_words`
--
-- --------------------------------------------------------
--
-- Table structure for table `smf_attachments`
--
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 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',
PRIMARY KEY ( `ID_ATTACH` ) ,
UNIQUE KEY `ID_MEMBER` ( `ID_MEMBER` , `ID_ATTACH` ) ,
KEY `ID_MSG` ( `ID_MSG` )
) TYPE = MYISAM AUTO_INCREMENT =212;

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

Illori

does this database have your smf in it already? if so you dont need to import anything.

moraidh

I think you misunderstood.  Old Site A has my SMF forum and I want to move it to Site B.

I have installed the latest version of SMF on Site B (clean installation, with no data).

I want to move the database with all my posts and forums from site A to Site B.

I managed to recreate the table structure in Site B by importing the backup made within Site A's SMF admin section into Site B using phpMyAdmin.

Hoever I still have to get all the posts (all data) across from A to B too.

Aleksi "Lex" Kilpinen

Two things you should note -

1) The DB backup will try to create tables that already exist, so it will not work unless you drop the existing tables first.
( That's the "#1050 - Table 'smf_attachments' already exists " error )

2) By simply uploading an older version of a DB to a new version of SMF might not work correctly, and you should make sure to upgrade it after you have it uploaded. ( Get the upgrade.php and all *.sql files from the latest upgrade package, upload them to your SMF installations root, and run upgrade.php )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: