ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 5 replies, has 2 voices, and was last updated by Dima Soroka Dima Soroka 2 years, 3 months ago.

  • Creator
    Topic
  • #11169

    peeush
    Participant

    Hi All

    What is the right (and hopefully, easy) way of taking backup of an OroCRM installation (configuration and data), including custom entities? Equally, how to go about restoring from this backup – to either recover from a corrupt system or recreate the system?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #11268
    Dima Soroka
    Dima Soroka
    Oro Core

    DB dump and cache clear should be good enough.

    #12169

    peeush
    Participant

    Thanks Dima; sorry I wasn’t able to get back to trying this out earlier.

    I tried your suggested method but with no success. Below is what I did:
    1. Took a database backup (from mysql command line)
    2. Installed a completely clean instance of OroCRM – v1.7.5 with a blank database.
    3. From mysql command-line, I restored the database from the backup I took in step 1.
    4. Cleared cache on the newly installed orocrm application.
    5. Tried to log in, but am getting an error: “Oro\Bundle\UserBundle\Entity\User::$avatar does not exist”.

    So you know, in my system, I had created some new entities (with many-to-many, many-to-one and one-to-many relationship with other custom and system entities.

    Any ideas on what I am doing wrong or how to go about restoring my system?

    Thanks

    #12230
    Dima Soroka
    Dima Soroka
    Oro Core

    You may need to take a look into upgrade instructions in case you had older version of application before. Please clarify, are you trying to move DB from staging/dev environment to some other one (production) with the same version of OroCRM or you trying to upgrade to latest version of OroCRM?

    #12246

    peeush
    Participant

    Thanks Dima!

    I was trying to move the DB from one environment to other, but was making the mistake of using the latest version of OroCRM on the new server.

    As you noted, I have now tried upgrading the current server (using the instructions in upgrade.md) prior to moving the DB to the new environment, however, upgrade is failing at the last step with the following error:

    PHP Fatal error: Uncaught exception ‘ReflectionException’ with message ‘Class Oro\Bundle\UserBundle\Entity\AbstractUser does not exist’ in /usr/share/nginx/html/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/GeneratorExtensions/ExtendEntityGeneratorExtension.php:58
    Stack trace:
    #0 /usr/share/nginx/html/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/GeneratorExtensions/ExtendEntityGeneratorExtension.php(58): ReflectionClass->__construct(‘Oro\\Bundle\\User…’)
    #1 /usr/share/nginx/html/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/GeneratorExtensions/ExtendEntityGeneratorExtension.php(40): Oro\Bundle\EntityExtendBundle\Tools\GeneratorExtensions\ExtendEntityGeneratorExtension->generateConstructor(Array, Object(CG\Generator\PhpClass))
    #2 /usr/share/nginx/html/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/EntityGenerator.php(85): Oro\Bundle\EntityExtendBundle\Tools\GeneratorExtensions\ExtendEntityGeneratorExtension->generate(Array, Object(CG\Generato in /usr/share/nginx/html/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/GeneratorExtensions/ExtendEntityGeneratorExtension.php on line 58

    So you know, I have a few many-to-many (and other types of) custom entity relationships with other custom entities (created from the UI) and system entities in the current system.

    Any ideas how to fix this?

    Thanks!

    #12260
    Dima Soroka
    Dima Soroka
    Oro Core

    Please make sure you disable cron and stop clunk server prior the upgrade.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.