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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Importing backup data from 'standalone' to 'drupal' version
Pages: [1]

Author Topic: Importing backup data from 'standalone' to 'drupal' version  (Read 1004 times)

riccardofriede

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.44
  • PHP version: 5.2.13
Importing backup data from 'standalone' to 'drupal' version
February 17, 2011, 03:45:41 am
Hi everybody,

I'm facing a major issue restoring backup data because of an old installation of Civicrm Standalone.

I installed the 'standalone' version several months ago using my Mac as a local server, colletting there all of my data.

Now I've switched to the Drupal version (it's great!) and would like to import the backup of my data in there.

I've tried through PhpMyAdmin Mamp's panel, just importing the .zip file of backup data into the root Drupal database,
but it's not working, just 'error' messages.

How should I try this?

Many thanks!

rjb

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: Importing backup data from 'standalone' to 'drupal' version
February 17, 2011, 04:09:00 am
This may help you in the first instance: http://wiki.civicrm.org/confluence/display/CRMDOC33/Moving+an+Existing+Installation+to+a+New+Server+or+Location

But there may be further issues regarding standalone to Drupal, which I'm sure other people will help with.

Just wanted to give you a (very useful) starting off point to help solve your problem.

Best,

RJB

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Importing backup data from 'standalone' to 'drupal' version
February 17, 2011, 05:05:13 am
I am not 100% sure this approach will work, but it well may.

Anyhow, it's advisable to first install a fresh CiviCRM install with Drupal, and also to use a separate database for Drupal and another for CiviCRM. Then after it's installed and working, try importing your dump from the standalone into the CiviCRM.

If the import fails, post some of the error messages. Without that, we can't help.
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.

riccardofriede

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.44
  • PHP version: 5.2.13
Re: Importing backup data from 'standalone' to 'drupal' version
February 18, 2011, 06:00:25 am
I've tried this way:
1. i've installed a fresh copy of Drupal, after creating db named 'drupal_1'
2. i've just loaded CiviCrm as an extension, following the ordinary installation instructions
3. i0ve tried to import the db from phpmyadmin to 'drupal_1'

But, unfortunately, I get this message:


Errore
query SQL:

-- -- Database: `civicrm` -- -- -------------------------------------------------------- -- -- Struttura della tabella `civicrm_acl` -- CREATE TABLE `civicrm_acl` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique table ID', `name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ACL Name.', `deny` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Is this ACL entry Allow (0) or Deny (1) ?', `entity_table` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)', `entity_id` int(10) unsigned DEFAULT NULL COMMENT 'ID of the object possessing this ACL', `operation` enum('All','View','Edit','Create','Delete','Grant','Revoke','Search') COLLATE utf8_unicode_ci NOT NULL COMMENT 'What operation does this ACL entry control?', `object_table` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The table of the object controlled by this ACL entry', `object_id` int(10) unsigned DEFAUL[...]

Messaggio di MySQL:

#1050 - Table 'civicrm_acl' already exists



I've even tried to install a fresh standalone on the db 'civicrm_1' (being 'civicrm' db the one from which I've made the data backup)
and then loaded the 'civicrm' backup to 'civicrm_1', but it's not working yet.

I really can't wonder why, it's odd: I try to log in via myopenid but it's like something is badly broken.

Maybe I should try to install a fresh mamp -> fresh drupal -> fresh civicrm -> backup data?



Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Importing backup data from 'standalone' to 'drupal' version
February 18, 2011, 06:07:59 am
The message:

Code: [Select]
#1050 - Table 'civicrm_acl' already exists
means that your import is not dropping the tables first. This option to 'drop tables' is one you can choose when you do an export. Can you try again with that?
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.

riccardofriede

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.44
  • PHP version: 5.2.13
Re: Importing backup data from 'standalone' to 'drupal' version
February 18, 2011, 09:48:33 am
Hershel,

I've tried adding the 'drop table' function to the db export,
but now after importing (to another standalone installation) I get this error message:


Errore
query SQL:

--
-- Database: `civicrm`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `civicrm_acl`
--
DROP TABLE IF EXISTS  `civicrm_acl` ;

Messaggio di MySQL:

#1217 - Cannot delete or update a parent row: a foreign key constraint fails



Any other suggestion?
Gosh, I f****n' need my data back!!!  :-\

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Importing backup data from 'standalone' to 'drupal' version
February 19, 2011, 10:41:18 am
You're getting closer. Now also check off "Disable foreign key checks" when you do the dump (presuming you are using phpMyAdmin) and that should fix that error.
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.

riccardofriede

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.1.44
  • PHP version: 5.2.13
Re: Importing backup data from 'standalone' to 'drupal' version
February 20, 2011, 01:41:08 pm
Quote from: hershel on February 19, 2011, 10:41:18 am
Now also check off "Disable foreign key checks" when you do the dump (presuming you are using phpMyAdmin) and that should fix that error.

I tried and it worked, importing was successful! Many thanks, Hershel!

Unfortunately, at log in the fresh Standalone installation gives me back

"Unknown status returned."

and the Joomla (I've tried importing to it too) returns

OpenID authentication failed: Bad signature
Sorry. A non-recoverable error has occurred.
DB Error: no such field

Sorry. A non-recoverable error has occurred.
DB Error: no such field
Error Details
Database Error Code: Unknown column 'is_deleted' in 'field list', 1054
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

    => -19
       
[message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT  id, is_deleted 
 FROM civicrm_contact
 
 WHERE (  civicrm_contact.id = 1 ) 
 
 
 
 [nativecode=1054 ** Unknown column 'is_deleted' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT  id, is_deleted 
 FROM civicrm_contact
 
 WHERE (  civicrm_contact.id = 1 ) 
 
 
 
 [nativecode=1054 ** Unknown column 'is_deleted' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT  id, is_deleted 
 FROM civicrm_contact
 
 WHERE (  civicrm_contact.id = 1 ) 
 
 
 
 [nativecode=1054 ** Unknown column 'is_deleted' in 'field list']"]




What else can I add?

When I created the various db and installed the various CiviCrm (both the old and new standalone, and for the new joomla and the new drupal)
I've always used the same user and password during the various installation processes.
 
Maybe is it somehow related to this?

I don't understand a thing about where the REAL problem maybe,
but it sounds to me that there's something broken about my OpenId account, which is the user I used everytime to access CiviCrm and so to build the db I'm trying to restore. It's something like the user is 'stored' inside that db and that it is no longer recognized as the one with the permissions to access.

Maybe I'm just terribly wrong, but, really I can't imagine what's going on!

Your help would really be appreciated,
and I thank you a lot for alla the support you've already given!
« Last Edit: February 20, 2011, 01:45:01 pm by riccardofriede »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Importing backup data from 'standalone' to 'drupal' version
February 21, 2011, 03:11:08 am
I think your version of CiviCRM doesn't match the version of standalone you had. Either match the version (replace the CiviCRM code) or run the upgrade script to upgrade your DB to match your code version.
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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Importing backup data from 'standalone' to 'drupal' version

This forum was archived on 2017-11-26.