Migrating elgg to a new server

Can anyone provide pointers for migrating elgg to a new install on another server? I tried using the information found at (http://docs.elgg.org/wiki/How_do_I_move_my_site%3F#Search_and_replace_on_database_dump_file) only it doesn't work.

I have tried performing this after setting up a new elgg susyem using the setup Wizard and by editing the settings file directly. In both cases it's almost like elgg ignores these settings and creates new stuff anyway.

Anyone ever done this?

Thanks, John

  • I still, however, can't get this to work. I have validated that all of the db stuff is right. After I restore the DB I can see the proper values, but elgg does not allow me to login as any of the users. It still thinks I didn't register from my initial account (says I didn't validate) What the heck is elgg doing if it is pointing to a DB with all of the data?

  • @kibbis

    if you have skype with mikogo screen share - i can have a look at your setup.

  • I'm sorry Dhrup, I don't. I use the Adobe conferencing solution. I am getting errors in Apache relating to the database.

  • Dhrup, would you care to see the Apache error log or jump on a Adobe Conference?

    Thanks!

  • Here is what happens when I follow the "drop the database and restore yours from backup" step:

    [Tue Mar 10 09:24:23 2009] [error] [client 127.0.0.1] WARNING: 2009-03-10 10:24:23 (MDT): "file_get_contents(C:\\WINDOWS\\Temp/sess_2dt2e1a3rvpii15nl3vr058c13) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory" in file C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\sessions.php (line 449)
    [Tue Mar 10 09:24:23 2009] [error] [client 127.0.0.1] *** FATAL EXCEPTION *** : exception 'DatabaseException' with message 'Table 'the0905308554672.elggdatalists' doesn't exist QUERY: SELECT value from elggdatalists where name = '__site_secret__' limit 1' in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\database.php:194\nStack trace:\n#0 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\database.php(319): execute_query('SELECT value fr...', Resource id #54)\n#1 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\elgglib.php(1618): get_data_row('SELECT value fr...')\n#2 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\actions.php(217): datalist_get('__site_secret__')\n#3 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\sessions.php(284): get_site_secret()\n#4 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\sessions.php(324): get_session_fingerprint()\n#5 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\elgglib.php(1355): session_init('boot', 'system', NULL)\n#6 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\lib\\elgglib.php(1411): events('boot', 'system', '', NULL, true, NULL)\n#7 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\engine\\start.php(151): trigger_elgg_event('boot', 'system')\n#8 C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\twg\\index.php(17): require_once('C:\\Program File...')\n#9 {main}
    [Tue Mar 10 09:24:23 2009] [error] [client 127.0.0.1] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0

    This is generated in Apache after trying to load the site.

    Ideas?

  • "...*** FATAL EXCEPTION *** : exception 'DatabaseException' with message 'Table 'the0905308554672.elggdatalists' doesn't exist "

    --- looks like you may have something broken here.

  • Your settings.php file says your database name is the0905308554672. Is this correct?

     

  • Yes, that is my db name. I had my site on a hosted GoDaddy server, now moving to a more secure and faster virtual dedicated box. Both new and old db's are named this. The db is a direct mySql db backup.

    When I drop the schema and recreate from this backup, I do not get any errors.

  • You should be able to check whether this database/table exists using phpMyAdmin or similar. Elgg doesn't think it exists.

  • I am using MySql Administrator from Sun and the entire Schema shows just fine. I can browse the data in the table and see the correct information. Furthermore I have tested the admin account and permissions, all looks good. Is there some kind of reboot / cache mechanism? Am I performing the db update improperely? This is what I do:

    1. Install elgg
    2. Fill out db wizard
    3. Fill out Site wizard
    4. Edit db dump to reflect new site URL and data dir
    5. Copy data from previous site
    6. Drop schema created by Wizard
    7. Restore db to same Schema name as was before (and previously dropped)
    8. Load elgg

    Thoughts?