Announcement

Collapse
No announcement yet.

Migration from one EspoCRM instance to another

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migration from one EspoCRM instance to another

    Hi everyone,

    I'm currently moving my charities web hosting provider from one provider (Linode - a singular nanode) to another (Hostinger - a VPS) - and this involves us also moving EspoCRM across.

    We have EspoCRM installed on both the server we want to migrate to, and the existing server, and its now a case of effectively duplicating our content on the existing server (users, accounts, contacts, our custom configuration such as entities, layouts, SSO/authentication etc) into our new EspoCRM instance.

    Our old server also ran EspoCRM on Ubuntu directly using Apache, and our new server is using Docker.

    I'm not incredibly technically savvy (although my colleagues would say I am!) but this has stumped me a bit.

    Any help would be much appreciated!!

  • #2
    Hi,

    You can just move the folder and database between the servers

    If you really need to migrate data between 2 existing instances, you can utilize our Export/Import extension. https://docs.espocrm.com/extensions/...-import-usage/

    Comment


    • #3
      Hi, we just installed that extension and then ran the bin/command export-import export command, and no word of a lie, all our data has just disappeared.
      Click image for larger version

Name:	image.png
Views:	83
Size:	16.8 KB
ID:	104584
      Little bit freaked out as I also can't find the export anywhere - even though it suggested it was exported into .data/export-import. Unfortunately I suspect that folder sat within var/www/espocrm as well.

      Do you have any idea what's happened and if this vital data is recoverable at all???​

      Comment


      • #4
        Specifically we got this output, then all the data disappeared:

        root@localhost:/var/www/espocrm# bin/command export-import export
        Configuration... done
        Customization... done

        ArrayValue...
        Total: 0
        Attachment...
        Total: 194
        AuthenticationProvider...
        Total: 0
        Autofollow...
        Total: 0
        Currency...
        Total: 1
        DashboardTemplate...
        Total: 1
        Email...
        Total: 0
        EmailAccount...
        Total: 0
        EmailAddress...
        Total: 165
        EmailFilter...
        Total: 0
        EmailFolder...
        Total: 0
        EmailTemplate...
        Total: 1
        EmailTemplateCategory...
        Total: 0
        Export...
        Total: 0
        ExternalAccount...
        Total: 0
        GroupEmailFolder...
        Total: 0
        Import...
        Total: 4
        ImportError...
        Total: 98
        InboundEmail...
        Total: 0
        KanbanOrder...
        Total: 3
        LayoutRecord...
        Total: 0
        LayoutSet...
        Total: 0
        LeadCapture...
        Total: 0
        LeadCaptureLogRecord...
        Total: 0
        MassAction...
        Total: 0
        NextNumber...
        Total: 0
        Note...
        Total: 145
        Notification...
        Total: 31
        PasswordChangeRequest...
        Total: 0
        PhoneNumber...
        Total: 43
        Portal...
        Total: 0
        PortalRole...
        Total: 1
        Preferences...
        Total: 6
        Role...
        Total: 1
        Sms...
        Total: 0
        Subscription...
        Total: 65
        SystemData...
        Total: 1
        Team...
        Total: 2
        Template...
        Total: 0
        UniqueId...
        Total: 0
        User...
        Total: 6
        UserData...
        Total: 0
        Webhook...
        Total: 0
        WebhookEventQueueItem...
        Total: 0
        WebhookQueueItem...
        Total: 0
        WorkingTimeCalendar...
        Total: 0
        WorkingTimeRange...
        Total: 0
        Account...
        Total: 57
        Call...
        Total: 10
        Campaign...
        Total: 0
        CampaignLogRecord...
        Total: 0
        CampaignTrackingUrl...
        Total: 0
        Case...
        Total: 0
        Contact...
        Total: 117
        Document...
        Total: 5
        DocumentFolder...
        Total: 0
        EmailQueueItem...
        Total: 0
        KnowledgeBaseArticle...
        Total: 0
        KnowledgeBaseCategory...
        Total: 0
        Lead...
        Total: 0
        MassEmail...
        Total: 0
        Meeting...
        Total: 10
        Opportunity...
        Total: 6
        Reminder...
        Total: 0
        Target...
        Total: 0
        TargetList...
        Total: 1
        Task...
        Total: 2
        BpmnSignalListener...
        Total: 0
        GoogleCalendarRecurrentEvent...
        Total: 0
        EmailEmailAccount...
        Total: 0
        EmailEmailAddress...
        Total: 0
        EmailUser...
        Total: 0
        EntityUser...
        Total: 0
        EntityTeam...
        Total: 14
        GroupEmailFolderTeam...
        Total: 0
        InboundEmailTeam...
        Total: 0
        NoteUser...
        Total: 155
        NotePortal...
        Total: 0
        NoteTeam...
        Total: 10
        KnowledgeBaseArticlePortal...
        Total: 0
        PortalPortalRole...
        Total: 0
        PortalUser...
        Total: 1
        PortalRoleUser...
        Total: 1
        RoleTeam...
        Total: 0
        RoleUser...
        Total: 6
        SmsPhoneNumber...
        Total: 0
        TeamUser...
        Total: 7
        EntityEmailAddress...
        Total: 163
        EntityPhoneNumber...
        Total: 44
        TargetListUser...
        Total: 0
        AccountPortalUser...
        Total: 1
        CallUser...
        Total: 13
        MeetingUser...
        Total: 17
        UserWorkingTimeRange...
        Total: 0
        WorkingTimeCalendarWorkingTimeRange...
        Total: 0
        AccountTargetList...
        Total: 0
        AccountDocument...
        Total: 0
        AccountContact...
        Total: 132
        EngagementMeetings...
        Total: 2
        EngagementDocument...
        Total: 2
        CallLead...
        Total: 0
        CallContact...
        Total: 12
        CampaignTargetListExcluding...
        Total: 0
        CampaignTargetList...
        Total: 0
        CaseKnowledgeBaseArticle...
        Total: 0
        CaseContact...
        Total: 0
        ContactDocument...
        Total: 0
        ContactTargetList...
        Total: 19
        ContactMeeting...
        Total: 16
        ContactOpportunity...
        Total: 13
        MeetingDocument...
        Total: 0
        DocumentLead...
        Total: 0
        DocumentOpportunity...
        Total: 3
        KnowledgeBaseArticleKnowledgeBaseCategory...
        Total: 0
        LeadTargetList...
        Total: 0
        LeadMeeting...
        Total: 0
        MassEmailTargetListExcluding...
        Total: 0
        MassEmailTargetList...
        Total: 0

        Files saved at "./data/export-import".
        Done.​

        Comment


        • #5
          In fact, just realised that I ran this command just after, while I tried to do another export to a directory I knew where it was:

          root@localhost:/var/www/espocrm# bin/command export-import export --path="/var/www/espocrm"
          Configuration...
          Error: Class "Espo\Modules\ExportImport\Tools\Config\Params " not found
          PHP Fatal error: Uncaught Error: Class "Monolog\LogRecord" not found in /var/www/espocrm/vendor/monolog/monolog/src/Monolog/Logger.php:357
          Stack trace:
          #0 /var/www/espocrm/vendor/monolog/monolog/src/Monolog/Logger.php(579): Monolog\Logger->addRecord()
          #1 /var/www/espocrm/application/Espo/Core/Utils/Log.php(149): Monolog\Logger->log()
          #2 /var/www/espocrm/vendor/monolog/monolog/src/Monolog/ErrorHandler.php(190): Espo\Core\Utils\Log->log()
          #3 /var/www/espocrm/vendor/monolog/monolog/src/Monolog/ErrorHandler.php(92): Monolog\ErrorHandler->handleException()
          #4 [internal function]: Monolog\ErrorHandler->Monolog\{closure}()
          #5 {main}
          thrown in /var/www/espocrm/vendor/monolog/monolog/src/Monolog/Logger.php on line 357​

          Comment


          • #6
            As you set the path parameter to the instance root directory, the command removed the whole directory. Exported files are supposed to be written in that directory.

            Hope you have a backup.

            Comment

            Working...
            X