Koozali.org formerly Contribs.org

Migrating web applications from SME 6.x to SME 7.x

Migrating web applications from SME 6.x to SME 7.x
« on: May 07, 2008, 11:51:14 AM »
We have a very old server running SME 6.0.1. The only thing left on it is a few web sites that uses mysql databases.

What I want to do - if it is possible - is to move those web sites to a fresh installed SME 7 server.
If I can backup the databases and restore them on the new server, and move the content of the ibays containing the files that the web sites consist of, wouldn't that be a way of migrating to the new server?

So my question is will this work, and how do I do it? The "pre-backup" event dumps the databases all right, but just ALL databases. There might be other databases that I don't want. How do I restore the databases on the new server?

The web applications are phpnuke, osticket and phpwiki. If you have any feedback on those, please tell me. Would it be possible to install newer versions and use the old databases etc.

Any help is appreciated!

/Per


Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #1 on: May 07, 2008, 02:29:27 PM »
We have a very old server running SME 6.0.1. The only thing left on it is a few web sites that uses mysql databases.

What I want to do - if it is possible - is to move those web sites to a fresh installed SME 7 server.
If I can backup the databases and restore them on the new server, and move the content of the ibays containing the files that the web sites consist of, wouldn't that be a way of migrating to the new server?

So my question is will this work, and how do I do it? The "pre-backup" event dumps the databases all right, but just ALL databases. There might be other databases that I don't want. How do I restore the databases on the new server?
Why not do a backup and a restore per server-manager? This should backup ibays as well as their databases.

The web applications are phpnuke, osticket and phpwiki. If you have any feedback on those, please tell me. Would it be possible to install newer versions and use the old databases etc.
Most likely not as on updates database layouts and field types may be updated/altered as well. You will have to dig trough the changelogs or just cross your fingers and try...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #2 on: May 07, 2008, 02:54:57 PM »
I guess I could do that. Are the different SME versions compatible when it comes to backup/restore?
What about different versions of mysql, will they be compatible?

The best thing would be if I didn't have to backup EVERYTHING on the old server, as it contains a lot of obsolete junk as well.

/Per

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #3 on: May 07, 2008, 04:14:11 PM »
I guess I could do that. Are the different SME versions compatible when it comes to backup/restore?
If you use on of the build-in options of stock SME Server and not a contribs I guess so.

What about different versions of mysql, will they be compatible?
Do not remember the exact verison of mysql on SME 6, but it might be the 3.x release which does differ from SME Server's current release, but AFAIK it is kept very much backwards compatible. For more information you should consult the MySQL manual.

The best thing would be if I didn't have to backup EVERYTHING on the old server, as it contains a lot of obsolete junk as well.
Delete anything you do not need before making a backup I would say...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #4 on: May 07, 2008, 04:18:38 PM »
I will try different ways...

Thanks for the input!

/Per

Offline dmay

  • *
  • 450
    • http://myezserver.com
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #5 on: May 07, 2008, 05:11:33 PM »
We have a very old server running SME 6.0.1. The only thing left on it is a few web sites that uses mysql databases.

What I want to do - if it is possible - is to move those web sites to a fresh installed SME 7 server.

Why not simply upgrade your existing server to latest SME build, then transfer to new hardware using any of the the various methods available?

Darrell

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #6 on: May 08, 2008, 10:19:15 AM »
I have thought of that, but there are many (undocumented) contribs installed over the years, and it would be nice to have a fresh install with just the mentioned web applications.

I have considered a backup and restore to the same version, but to a vmware machine. That way I can make mistakes and undo them :)


Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #7 on: May 08, 2008, 10:29:57 AM »
I seem to have an issue with restoring a backup from my SME 6.0.1 to a fresh SME 7.0.3. The final file is displayed (/etc/smbpasswd), but not "restore finished" (or what ever it says in english, I use swedish locale). And even though I waited overnight and rebooted I ended up in an "inconsistent state".

EDIT: The same problem appears when I try to restore the backup to a fresh SME 6.0.1!

Any hints on that? Version incompatibility? Problems with contribs?

I have also tried to restore databases manually and moved the files to ibays with exactly the same names. That way I get "unable to connect to database" and "insufficient permissions" in another case. I guess the install scripts does some funny things with the databases...

« Last Edit: May 08, 2008, 11:27:36 AM by Salmoneus »

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #8 on: May 08, 2008, 11:42:36 AM »
The data based should be dumped as part of pre-backup to /home/e-smith/db/mysql/xxx.dump
Then use http://wiki.contribs.org/Phpmyadminmulti logon and import the Dbases?
Should work ?!
 :-?

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #9 on: May 08, 2008, 01:41:45 PM »
I have installed the phpmyadmin contrib (on the new machine), but when I try to restore the dump from the 6.0.1 machine on the 7.0.3 machine I get this error:


SQL-fråga:

-- MySQL dump 8.23
--
-- Host: localhost Database:
------------------------------------------------------- --
-- Server version 3.23.58
--
-- Current Database: awol
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/awol;


MySQL sa: 
#1064 - 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 '---------------------------------------------------------
-- Server version    3.23' at line 1



Wrong mysql version?

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #10 on: May 08, 2008, 07:57:37 PM »
I have installed the phpmyadmin contrib (on the new machine), but when I try to restore the dump from the 6.0.1 machine on the 7.0.3 machine I get this error:


SQL-fråga:

-- MySQL dump 8.23
--
-- Host: localhost Database:
------------------------------------------------------- --
-- Server version 3.23.58
--
-- Current Database: awol
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/awol;


MySQL sa: 
#1064 - 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 '---------------------------------------------------------
-- Server version    3.23' at line 1



Wrong mysql version?

No, are you sure you did not mess with the dumpfile? What command are you using to import the database? Normally it should not be bothered by the header and ignore it.

It might well be that phpmyadmin will not ignore the comments and the header. The easiest thing would be to just import it as root user on the SME Server shell:

Code: [Select]
mysql < /path/to/dumpfile.sql
It might be that you will also restore the old root password which will render your database system inaccessible. This can be solved by this instruction: http://wiki.contribs.org/MySQL#Resetting_the_MySQL_root_password
« Last Edit: May 08, 2008, 08:00:32 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #11 on: May 09, 2008, 08:09:46 AM »
I will be unable to dig into this for a couple of days now, but I will let you know the results.

Thanks!


Offline byte

  • *
  • 2,183
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #12 on: May 09, 2008, 06:54:30 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #13 on: May 20, 2008, 03:52:44 PM »
After some digging I have found out that one of the applications does NOT use mysql as I thought. Apparently it uses something called dba, and the dba handler is "gdbm" (according to the config file). When I move the application to an SME 7 box I get this error:

lib/DbaDatabase.php:42: Fatal[256]: dba_open(/home/e-smith/files/ibays/phpwiki/html/pages/wiki_pagedb.gdbm,c): No such handler: gdbm

Is gdbm not a part of SME 7? Can it be installed? Can the database be converted somehow?

/Salmoneus

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Migrating web applications from SME 6.x to SME 7.x
« Reply #14 on: May 20, 2008, 04:05:38 PM »
Is gdbm not a part of SME 7? Can it be installed? Can the database be converted somehow?
[/quotegdbm should be installed, you can check with:
Code: [Select]
rpm -q gdbm
lib/DbaDatabase.php:42: Fatal[256]: dba_open(/home/e-smith/files/ibays/phpwiki/html/pages/wiki_pagedb.gdbm,c): No such handler: gdbm
This seems more like a php error, I think the pear gdbm lib is not installed, perhaps this might be opf help: http://www.php.net/manual/en/ref.dbm.php
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)