cancel
Showing results for 
Search instead for 
Did you mean: 

Export problem

sparcle
Champ in-the-making
Champ in-the-making
Hello,
I'm trying to move Alfresco CE 3.4 d from Windows to Linux machine, but without success. It was initially installed on Centos Linux and worked without problems in version 3.2. Then I had to change my linux machine so I moved it temporary to Windows. It went without any problems and works well (I backed-up MySQL database and alf_data folder and then imported this database to Windows machine and pasted alf_data). I have installed it from the stack package, version 3.4d. The upgrade process went also ok and by now I have working well 3.4d version on my Windows machine.
Now I would like to move it back to Linux (new machine). I have installed Alfresco 3.4d on Linux (so it's the same version on linux and on Windows) from stack package and it works. But after moving the database and alf_data from Windows machine - it doesn't work. Moving to another Windows machine goes well everytime.
I have read about export-import procedure and tried to export the whole repository (starting from Company Home) from Explorer interface. The export went well and I have one big (ca 12 GB) file. Unfortunatelly - the import on Linux crashes.

I would like to try export/import the whole repository with command line tools and than import it on my new Linux machine, but after reading the Wiki pages, I'm still not able to export and import the whole repository (with users, rights and all the staff). Could somebody please help me and tell what should I type to export and then import the whole repository?
4 REPLIES 4

scouil
Star Contributor
Star Contributor
I migrated from windows to linux using the backup procedure and everything went well…

How are you backuping your mysql database?

Are both your alfresco in the same language (maybe different naming due to languages could crash everything)?

sparcle
Champ in-the-making
Champ in-the-making
Hello Scouil! Thank you very much for your reply!

I do database backup with phpMyAdmin:
1. Log-in as root
2. Choose database "alfresco"
3.  And then "Export"->"Save as a file".

On the destination server I reverse the process:
1. Log-in to phpMyAdmin as root,
2. Create database "alfresco"
3. Import->"From file".

And so I have the database restored.

I have also marked one strange thing: if I try to delete all the tables from the database I got an error. While I'm logged as root I think this is not my user rights problem. Some of the tables are deleted, some resist. The error text is: "Cannot delete or update a parent row: a foreign key constraint fails". The problem occurs every time both on Windows and Linux machine. I think this is an error of 3.4d version. But this souldn't be a problem by migration, since migration from Windows to Windows goes.

Alfresco is in the same language (english) and versions (3.4.d) on both machines.

scouil
Star Contributor
Star Contributor
Hello,

The error you have while trying to delete is normal. It happens when you try to remove a parent table before its children tables. it can't be done because the children would point to a non-existing parent. That's normal behavior and the error doesn't come from this.

Are you doing hot backups or doing it while your server is stopped?

You may also need to check if you have your configuration (tomcat/shared/classes/extension/*) identical on both the servers (I'm especially thinking about the custom models) in order for the import to succeed.

Here is a part of the doc I wrote for my company. Forgive the windows-only paths/manipulations, I'm sure you'll be able to translate for linux.
Try this method instead of phpMyAdmin and cross your fingers:

1) Backup alfresco
   Stop alresco  (go to the services panel and stop alfrescoMySql and alfrescoTomcat)
   copy your data folder (by default C:\Alfresco\alf_data)
   backup your database to a file (by default: open a prompt and write C:\Alfresco\mysql\bin\mysqldump –databases alfresco –add-drop-database > dumpAlf.sql -u root -p )
   keep both the copy of alf_data and the generated dumpAlf.sql. those are the file you need to be able to restore alfresco.
   restart alfresco (go to the services panel and start alfrescoMySql and alfrescoTomcat)
   
2) Restore alfresco
   Stop alresco  (go to the services panel and stop alfrescoMySql and alfrescoTomcat)
   replace your data folder (by default C:\Alfresco\alf_data) with the one previously backed up
   restaure your database from the file previously backed up (C:\Alfresco\mysql\bin\mysql < dumpAlf.sql -u root -p)
   restart alfresco (go to the services panel and start alfrescoMySql and alfrescoTomcat)

Hope this works.

sparcle
Champ in-the-making
Champ in-the-making
Thank You for all of your information!
Unfortunately - this did not help. I have changed the Linux machine meantime (I hoped that this may be because of too week server and after switching to 64 bit it will start to work…) - but the problem still remains. There is no problem when I do exactly what you have told me by moving to another Windows machine. But when I try move to Linux - it fails every time.

Anyway - I have a brand new instance of Alfresco CE 3.4d running on Linux. There is no problem to set up the users - there are only few of us. What's important - this is the pages in Share that we just can't loose…