The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Jun 09, 2012 6:52 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jan 03, 2009 5:51 am
Posts: 19
Hello. Goal: I am trying to get a copy the contents/articles written. it will be great if I can get all of my menus and others too.

This site is still in the works when I moved a site to another host and forgot to backup and copy content/aritcles.
I went back to old host and went to 'backup wizard' to did 'home directory' and 'mysql databases', did not need the email or filter, nothing important.
Then went to new host and did a 'restore off the 'backup wizard''
This is after I changed dns and added domain to new host

what i notice was the db were different: adminsbc_jo104 (orig host) and brook_adminsbc_jo104(new host after I restore)
The site says -'Database Error: Unable to connect to the database:Could not connect to MySQL.'

Old host mysql user: adminsbc_jo104 (lost the password, can guest but not sure)
New host mysql user: brook_adminsbc - it will not allow me the old prefix because this running off another domain/site

What should I do?


Top
 Profile  
 
PostPosted: Sat Jun 09, 2012 9:17 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 3344
Location: Sydney, Australia
Did you update the database details in the file configuration.php in the main Joomla folder? You can find the details are in these instructions: http://docs.joomla.org/Copying_a_Joomla_website

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Mon Jun 11, 2012 4:52 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jan 03, 2009 5:51 am
Posts: 19
toivo wrote:
Did you update the database details in the file configuration.php in the main Joomla folder? You can find the details are in these instructions: http://docs.joomla.org/Copying_a_Joomla_website


Ok, I figure a way to get into the file manager and also export (sql file) the old phpAdmin acct. The problem is when I import into the new host of the phpAdmin:

Error

SQL query:

-- -- Dumping data for table `jos_banner` -- INSERT INTO `jos_banner` (`bid`, `cid`, `type`, `name`, `alias`, `imptotal`, `impmade`, `clicks`, `imageurl`, `clickurl`, `date`, `showBanner`, `checked_out`, `checked_out_time`, `editor`, `custombannercode`, `catid`, `description`, `sticky`, `ordering`, `publish_up`, `publish_down`, `tags`, `params`) VALUES (1, 1, 'banner', 'OSM 1', 'osm-1', 0, 43, 0, 'osmbanner1.png', 'http://www.opensourcematters.org', '2004-07-07 15:31:29', 1, 0, '0000-00-00 00:00:00', '', '', 13, '', 0, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', ''), (2, 1, 'banner', 'OSM 2', 'osm-2', 0, 49, 0, 'osmbanner2.png', 'http://www.opensourcematters.org', '2004-07-07 15:31:29', 1, 0, '0000-00-00 00:00:00', '', '', 13, '', 0, 2, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '', ''), (3, 1, '', 'Joomla!', 'joomla', 0, 33, 0, '', 'http://www.joomla.org', '2006-05-29 14:21:28', 1, 0, '0000-00-00 00:00:00', '', '<a href="{CLICKURL}" target="_blank">{NAME}</a>\r\n<br/>\r[...]

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 1


Top
 Profile  
 
PostPosted: Mon Jun 11, 2012 5:34 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 3344
Location: Sydney, Australia
If you are importing a table like jos_banner, the rows are inserted. If the table already contains rows where the 'bid' column is 1, you cannot add the same row the second time and that is what the error message about duplicate key means.

Check first if the table already has entries and if those entries are correct. If you need to replace the contents of the table, the right option in phpMyAdmin would probably be 'Restore' but be careful that you restore only the tables you want to restore. Also, keep in mind that if you have added to the new site for example articles and they do not exist in the old site, you will lose the new articles if you restore from the old site. Also the categories need to be the same, or you have to fix the relationships by manually editing the articles to link them to the correct categories.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Mon Jun 11, 2012 6:48 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jan 03, 2009 5:51 am
Posts: 19
toivo wrote:
If you are importing a table like jos_banner, the rows are inserted. If the table already contains rows where the 'bid' column is 1, you cannot add the same row the second time and that is what the error message about duplicate key means.,,, categories.


Prior to posting on forum. I went to HostGator (orig host) and "backup wizard" to backup sql and joomla directory to hard disk, then went into new host under the "backup wizard" restore by uploading sql and joomla directory into new host.
Didn't work. Went with your doc link, and got the error message above.

So I just went in MySql deleted the sql and user to start from scratch, still leaving the joomla directory that I've restored on the new host intact. Starting from scratch from a db view this is the error from phpAdmin:

Error

SQL query:

-- -- Database: `adminsbc_jo104` -- -- -------------------------------------------------------- -- -- Table structure for table `jos_banner` -- CREATE TABLE IF NOT EXISTS `jos_banner` ( `bid` int(11) NOT NULL AUTO_INCREMENT, `cid` int(11) NOT NULL DEFAULT '0', `type` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'banner', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `alias` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `imptotal` int(11) NOT NULL DEFAULT '0', `impmade` int(11) NOT NULL DEFAULT '0', `clicks` int(11) NOT NULL DEFAULT '0', `imageurl` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `clickurl` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `date` datetime DEFAULT NULL, `showBanner` tinyint(1) NOT NULL DEFAULT '0', `checked_out` tinyint(1) NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `editor` varchar(50) COLLATE utf8_unicode_ci DEFAULT N[...]

MySQL said: Documentation
#1046 - No database selected



Since I have the orig. joomla directory from old host..is there a way I can retrieve the articles that were written prior?

If I can get everything that would be great, if not, all I care about are the articles written, nothing else.


Top
 Profile  
 
PostPosted: Sat Jun 16, 2012 11:33 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
Install the same version of Joomla on the new host. This creates the new configuration.php file that you need for this new server.
Upload with FTP and overwrite the joomla_root/ directory files (not the configuration.php file) with the transferred files from the old site.
Using phpMyAdmin DUMP the tables from the new installation on MySQL.
import the database tables from the old site.
Make sure to edit the new configuration.php file with details of the table_prefix of transferred tables.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group