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 »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing backed up xxxx.sql file
Pages: [1]

Author Topic: Importing backed up xxxx.sql file  (Read 2724 times)

Dave Smith

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
Importing backed up xxxx.sql file
August 06, 2008, 05:07:59 pm
I have back up the database and now have an xxxx.sql file (actually two files because I backed up the whole database including Drupal and then a second version with just civiCRM tables).

For various depressing reasons I landed up complete reinstalling Drupal and civiCRM. I am hoping it will possible to upload my backed up xxxx.sql file and so rescue the original information.

My two questions are:

1. how to do this (my original thought was: mysql -uroot -p xxxx < xxxx.sql), and
2. whether to upload the whole database or just the civiCRM tables.

I am using Drupal 5.9 and civiCRM 2.0.

Thanks

Dave
"The philosophers have only interpreted the world, in various ways; the point is to change it." ... Marx

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing backed up xxxx.sql file
August 07, 2008, 10:43:57 am
Does your new install have Drupal and CiviCRM tables in the same database - or separate? Is it the same Drupal and CiviCRM codebase versions as the one you backed up from?

Assuming same version and one DB - you should be able to get your data back by these steps:
- create new empty DB
- modify the datasource (DSN) settings in both Drupal's settings.php and CiviCRM's civicrm.settings.php in your new install to point to the new empty DB (this way you can "go back" if this process fails) - these files are usally located in <drupal_root>/sites/default
- load your combined Drupal / CiviCRM xxxx.sql to the empty DB

Login and check / modify CiviCRM >> Global Settings >> Resource URLs and Directories screen values (they probably are using values from your prior install which will cause your screens to look funny).
Protect your investment in CiviCRM by  becoming a Member!

Dave Smith

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
Re: Importing backed up xxxx.sql file
August 11, 2008, 07:12:48 pm
If the backup file is from civiCRM version 1.9 does this mean that I am doomed - or is there a way round this?
"The philosophers have only interpreted the world, in various ways; the point is to change it." ... Marx

MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Importing backed up xxxx.sql file
August 11, 2008, 09:19:45 pm
First I am not expert on this, but if as Dave says you start on a new DB and leave the original untouched, you can always go back. If your previous install was 1.9 and you are trying to restore that database into a new 2.0 environment. Just make sure that ater the data is restored you follow the normal 1.9 -> 2.0 upgrade procedures.

http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Drupal+Sites+to+2.0

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing backed up xxxx.sql file

This forum was archived on 2017-11-26.