CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Moving CiviCRM to a new Server Troubles - SOLVED
Pages: [1]

Author Topic: Moving CiviCRM to a new Server Troubles - SOLVED  (Read 742 times)

bdika

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Moving CiviCRM to a new Server Troubles - SOLVED
October 25, 2014, 12:05:57 pm
Hi All:

I am trying to move a civicrm installation from one server to another and am having a very difficult time. I decided to try the non destructive method as explained in this http://forum.civicrm.org/index.php?topic=15052.0.

These are the steps I have taken without success so far. The problem starts at step 13 as explained below.

My approach to moving a civicrm install:

Quote
########### STEPS TO MOVE A CIVICRM SITE TO NEW SERVER #############

At old site: (Debian 7 server)

1. Turn off clean urls

2. go to http://<drupal_site>/admin/build/modules and disable, but don't uninstall CiviCRM.  You may need to disable dependent modules (e.g. CiviMember Roles Sync) before you can disable CiviCRM

3. Copy your codebase (Drupal, CiviCRM, files, etc)... all of it.  The documentation suggests that you could install a fresh copy of CiviCRM... I don't like that idea, because it's quite possible for someone to install a different/newer version or one with slightly different files (if e.g. you modified core, which is bad, but some people still do it).  Then you'll be compounding migration issues with upgrade/versioning issues.  Generally with a migration you want to ensure you're copying a site exactly as it is. I used tar.gz

4. Copy your databases.  If you're using mysqldump, then you'll actually want to run 3 commands:
$ # this is the same as the documentation, full mysqldump of drupal
$ mysqldump -u mysql_username -p drupal_db_name > drupal_dump_file.sql

$ # this is similar to the documentation, but we're not ignoring the civicrm_domain table
$ mysqldump -u mysql_username -p --ignore-table=civicrm_db_name.civicrm_acl_cache \
--ignore-table=civicrm_db_name.civicrm_acl_contact_cache \
--ignore-table=civicrm_db_name.civicrm_cache \
--ignore-table=civicrm_db_name.civicrm_group_contact_cache \
civicrm_db_name > civicrm_dump_file.sql

$ # this is new. drupal/civicrm will generate errors when it discovers the ignored tables \
are missing so you need to append the create table statements (but not the table data) \
to the dump you just created
$ mysqldump -u mysql_username -p --no-data civicrm_db_name civicrm_acl_cache \
civicrm_acl_contact_cache \
civicrm_cache \
civicrm_group_contact_cache >> civicrm_dump_file.sql


At the new site (Ubuntu 14.04 server)

5. Extract your tar.gz file to the server root. *** Check settings.php and civicrm.settings.php Carefully!! ***. Changed base url in civicrm.settings to http://ipaddress_of_linode/drupal7famfi2/

6. Change ownership of all files to www-data. I am using Ubuntu 14.04 at the new site.

7. Change directory and file permissions to
    /default on 755
    /default/files including all subfolders and files on 744 (or 755)
    /all/themes including all subfolders and files on 755
    /all/modules including all subfolders and files on 755
    /default/settings.php and /default/default.settings.php on 444

8. Create your mysql databases (one for drupal7 and one for civicrm)

9. Give privileges on mysql databases to dad and famfi respectively using http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+MySQL+Permission+Requirements and  https://www.drupal.org/documentation/install/create-database

10. Load your databases into the new server
$ mysql -u mysql_username -p drupal_db_name < drupal_dump_file.sql
$ mysql -u mysql_username -p civicrm_db_name < civicrm_dump_file.sql

11. Delete cache files at <drupal-root>/sites/default/files/civicrm/templates_c/*. I used rm but did not delete the directories below templates_c.

12. Log into Drupal http://<drupal_site>/user/login. Success.

13. go to http://<drupal_site>/admin/build/modules and enable CiviCRM (but not the other CiviCRM dependent modules).

When I enable civicrm and click on save configuration, I get a blank white screen with no errors or anything. When I reload the page it comes back to my modules page and shows civicrm as enabled but there is no civicrm item in the menu.

14. go to http://<drupal_site>/index.php?q=civicrm/admin/setting/updateConfigBackend&reset=1
this leads me to the following page not found message:

 Page not found

    Add URL redirect from this page to another location

The requested page "/drupal7famfi2/index.php?q=civicrm/admin/setting/updateConfigBackend&reset=1" could not be found.


15. go to http://<drupal_site>/index.php?q=civicrm/menu/rebuild&reset=1 to rebuild the menus. Same message as step 14

16. go to http://<drupal_site>/index.php?q=civicrm/admin/setting/path?reset=1
review your settings, adjust and click Save. Same message as step 14

17. go to http://<drupal_site>/admin/build/modules and enable any other CiviCRM dependent modules that were disabled in step #1.This leads to a white page and reloading shows a yellow page with a diagonal line of symbols on it. Reloading again leads to the white page. Back and forth.

Can anybody help with this?

Thanks in advance.

Bill Dika
« Last Edit: October 26, 2014, 09:57:35 am by bdika »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Moving CiviCRM to a new Server Troubles
October 26, 2014, 04:38:11 am
I would suggest:

1. Make sure you have Drupal working on the new server without CiviCRM.
2. Remove your civicrm.settings.php file
3. Install CiviCRM fresh into a temporary DB
4. If that works, then edit your civicrm.settings.php file to point to the real database
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

bdika

  • I’m new here
  • *
  • Posts: 23
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: drupal 7
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Moving CiviCRM to a new Server Troubles - SOLVED
October 26, 2014, 09:56:45 am
Thanks Hershel:

But I got it working following my method by not using tar.gz to transfer the drupal installation.

I downloaded the drupal folder to my desktop using filezilla and then uploaded it to the new server using filezilla and following the rest of my instructions it worked.

I may try your method as I experiment with this process.

Thanks again.

Bill Dika

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Moving CiviCRM to a new Server Troubles - SOLVED

This forum was archived on 2017-11-26.