MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.5.5 - Stable > Migration Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old February 14th, 2005, 06:44   #1
skyward
 
Join Date: Feb 2005
Posts: 1
skyward is on a distinguished road
Exclamation transfer Mambo, from old to new host

Here are the results of my work and searches. Share your infos !

Many people use CPanel to create/restore backups. It should work directly, but they're many ways to do it.


Transfer your files from old host to new host
Create a backup
Cpanel: generate full/home/db bkp


Restore backup
SSH: /scripts/restorepkg usernametobemoved

To restore a cpmove-username.tar.gz
1.Upload cpmove-username.tar.gz to the webserver's /home directory.
2.Type: /scripts/restorepkg username (replace username with the account username)
3.This will restore the site, and also create the cPanel account.

works only if you've acces to WHM, you're a reseller at the host.
Cpanel: restore a home bkp, restore db bkp
manual: uncompress archive (tar.gz). I used: tar -xzvpf bkpfile destdir/ . Run it from the directory containning the bkpfile. -p preserve file permissions.


Transfer database (MySQL)

create backup
Cpanel works ok. It makes the same bkp as phpmyadmin.
restore a bkp
Cpanel doesn't work well. db contains less data compared with original one (3 records less).
phpmyadmin: same result. db contains less data compared with original one (3 records less).
cpanel gives same result as phpmyadmin. However it seems to work.
I use phpmyadmin to create the destination database and put data in it (SQL query, import your db backup file, often a .gz)

Configuration post-transfer
.htaccess file is very important. Set the environnement for the script to work on your new host and following your wishes.
files and directory permissions are very important too. If you make a manual restore of the files, but sure to preserve it (tar -p).


Transfer Mambo CMS
domaine: onenew.org
I use Mambo CMS. I want to transfer it from my old host.
As any other script, to transfer it, one have to move the files and the
database and configure it to work on the new host.

I'd like to move my mambo site from www.nosens.org/2 (old host) to
www.onenew.org/2 (new host).

On the old host: I've used cpanel to backup the files (full backup) and
Phpmyadmin to backup the db.
On the new host: Ive used SSH to restore file (only the one I wanted,
in /public_html/2, preserving the permissions) and Phpmyadmin to restore the
db (all tables are ok).
I've checked the configuration.php file and I've put the correct parameters
(what I think they are at least):

****** (adapt with your parameters)
$mosConfig_host = 'localhost';
$mosConfig_user = 'username';
$mosConfig_password = '*****';
$mosConfig_db = 'username_mambo';
$mosConfig_dbprefix = 'mos_';
$mosConfig_lang = 'english';
$mosConfig_absolute_path = '/home/username/public_html/2';
$mosConfig_live_site = 'http://www.onenew.org/2';
***********
skyward is offline   Reply With Quote
Old April 16th, 2006, 06:21   #2
stevemanser
 
Join Date: Mar 2005
Posts: 2
stevemanser is on a distinguished road
Default

This is how I transfer basic Mambo sites from my old server (dream) to my new server (dream2). I know it is possible to transfer it using a home directory backup/restore and mamb1 database backup/restore, but it never seems to run properly afterwards.

Also, I find it is easier to re-install and configure certain add-on components after the main mambo transfer instead of trying to migrate them and all the Mambo directory structure. I don't use phpShop, but instead use Madeira Shop (on mamboxchange.com).


Transfer mambo website (e.g. from dream server to dream2)
=============================================
1. on dream2 using cpanelx, create new site
2. install mambo using fantastico
3. setup entry in FTP Explorer for new dream2 version of site
4. in FTP Explorer, edit the configuration.php... (optional*)
5. ...and set $mosConfig_live_site to your temporary path (optional*)
6. set permissions on configuration.php to rwrwrw
7. download mambo templates folder from dream and upload to dream2
8. from mambo administrator set the uploaded site template as Default
9. turn off unnecessary modules
10. set permissions on editors folder to rwrwrw
11. install htmlarea (or TMEdit) mambot (on mamboxchange.com)
12. in mambo site global configuration, select htmlarea as editor
13. also in mambo site global configuration, set unecessary options to hide
14. trash all unnecessary content
15. trash all unnecessary menus
16. from dream cpanelx, download mamb1 sql backup
17. from dream cpanelx, download home directory backup (for safety's sake)
18. using winace (winzip doesn't do gz) extract and edit mamb1 sql script
19. replace "option varchar" with "`option` varchar"
20. replace "fulltext mediumtext" with "`fulltext` mediumtext"
21. replace "option," with "`option`,"
22. replace "fulltext," with "`fulltext`,"
23. replace ",default" with ",`default`"
24. replace "default tinyint" with "`default` tinyint"
25. recreate mamb1.gz (winace can be a bit strange here - don't recreate folder structure, no subdirs)
26. in cpanelx, delete mamb1 database (created in step 2)
27. in cpanelx, restore mamb1.gz sql backup on dream2
28. grant permissions on new mamb1 database to existing user for old mamb1
29. from dream, download images/stories folder and files
30. upload images to dream2
31. try out your new site
32. install any optional components and configure them

*only required if you haven't pointed dns to the new site yet.

If you get the error "This site is temporarily unavailable", then you have a sql access issue. Try:
- creating a new sql user in cpanelx
- give it all permissions to the mamb1 database
- edit the mambo configuration.php file and set the $mosConfig_user and
$mosConfig_password. IT IS NOT HASHED OR ENCRYPTED, but the initial sql user has a password THAT LOOKS encrypted. The $mosConfig_secret setting has nothing to do with the user and password - it is not actually used in Mambo at this time.

If you get the error "DB function failed with error number 1146" when first trying your new site, then the sql restore did not work - most probably because of some reserved word in the newer version of MySQL. You now need to track that error down by going into phpMyAdmin, sql code window, pasting your mamb1 sql script into the box and running it.

Last edited by stevemanser : April 16th, 2006 at 09:29.
stevemanser is offline   Reply With Quote
Old April 16th, 2006, 06:37   #3
ddp
 
Join Date: Mar 2006
Location: Toronto
Posts: 32
ddp is on a distinguished road
Default

Great work guys a very usefull thread!!

I've bookmarked this as I plan to move my site soon.
ddp is offline   Reply With Quote
Old May 14th, 2006, 13:37   #4
Varanus
 
Join Date: May 2006
Location: Eastern PA, US
Posts: 14
Varanus is on a distinguished road
Default Question on this...

Quote:
If you get the error "DB function failed with error number 1146" when first trying your new site, then the sql restore did not work - most probably because of some reserved word in the newer version of MySQL. You now need to track that error down by going into phpMyAdmin, sql code window, pasting your mamb1 sql script into the box and running it.
Hi,

How do you do the last part of this...pasting script into box and running it...where do I find the script? I am having this issue on my new site, and it seems as though the database looks exactly the same as far as size, records, etc, but still not working.

Thanks,
Varanus
Varanus is offline   Reply With Quote
Old May 14th, 2006, 18:10   #5
judesoul
 
Join Date: Sep 2005
Location: Philippines
Posts: 978
judesoul is on a distinguished road
Default

thanks for the inputs guys!

Mambo on!
__________________
Pinoy Mambo'ers
"Be Honest even others will not"
judesoul is offline   Reply With Quote
Old May 14th, 2006, 21:36   #6
srilinux
 
Join Date: May 2006
Posts: 7
srilinux is on a distinguished road
Default

Hi...Judesoul thanks for your information
at the moment
I will read step by step for your alternative solution info
and until now I am still waiting for help others.
srilinux is offline   Reply With Quote
Old May 15th, 2006, 11:06   #7
stevemanser
 
Join Date: Mar 2005
Posts: 2
stevemanser is on a distinguished road
Default

Quote:
Originally Posted by Varanus
Hi,

How do you do the last part of this...pasting script into box and running it...where do I find the script? I am having this issue on my new site, and it seems as though the database looks exactly the same as far as size, records, etc, but still not working.

Thanks,
Varanus
You get the script in Step 16 - do a sql backup of the old Mambo database from the old site. If you can't do a sql backup then you need to somehow get the sql script from your mambo database somehow. As mentioned, it doesn't always run on the new site when you restore, and this is usually because the old script contains reserved words. Try replacing the following in the script file:

"option varchar" replace with "`option` varchar"
"option," replace with "`option`,"
"fulltext mediumtext" replace with "`fulltext` mediumtext"
"fulltext," replace with "`fulltext`,"
", default" replace with ",`default`"
"default tinyint" replace with "`default` tinyint"
"`default`_con" replace with "default_con"

Basically, you are just replacing reserved words like "default" with quoted versions - like "`default`".

Steve
stevemanser is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone know of a good UK Mambo host ...? janeology General Questions 9 February 13th, 2007 11:41
Host per Mambo blueciccio Italian Forum 10 March 17th, 2006 08:34
An extensive listing of Mambo security problems afaton Security & Performance 4 December 8th, 2004 20:51
New hosting company, domain transfer and Mambo Control Panel access issues? artwise General Questions 5 November 30th, 2004 13:41
Custom CMT Mambo Version Certificates PhilTaylor (aka PrazGod) Custom Development 12 June 14th, 2004 02:12


All times are GMT -7. The time now is 06:03.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.