How to move your Zope / Plone website to a new server on Linux
Moving your website that runs on Zope / Plone and Linux to a different server is documented on the Plone website. However, the article only gives you the information about the files and folders that stores your website information and customisations. What it does not talk about are the practical issue you will face when carrying out the actual migration. I faced those issues and I spent a long time before I could figure out what was wrong. Maybe it was pretty obvious. But obvious things are what we generally tend to ignore while troubleshooting.
To move my website, I stopped my website processes and copied the Data.fs file and the Products folder to ensure that I have all my products and customisations that I made on my website on the old server to be there on the new server. On the new server, I had Zope and Plone configured and running in its native configuration and first tested it out so that I know the installation is working as expected. (By the by, Zope and Plone included with FC6 does not work. There is a bug in Five product. The version 1.3.7 included doesn't work with the package and you need to upgrade to 1.3.8 or later till 1.4.0. Again that does not solve the issue. It has some other errors on which I didn't spend too much time troubleshooting). Again I stopped Zope on the new server and backed up the Data.fs. file and Products folder on the new box before copying over the production files. (Although you don't have to really backup the files on the new server, its a good idea if you have to roll back for any reason and do some testing).
Note: You don't really have to stop the Zope processes before coying the files to or from the Zope instance, but I would strongly recommend that the process be stopped so that there are no hooks attached to the files while you are copying from or to the Zope instance.
Once I had copied over the new data files, I restarted Zope and tried to access it. Although the process was running, even the Zope welcome page refused to display in the browser. I did a lot of research on some high tech stuff but did not find any solution for my problem. At a sudden inspiration I ran the ls command with the -l switch and saw that the owner user and group for the Data.fs file was root and not plone. I checked in the old server and the owner and group was plone. So then I proceeded to change the owner of the file to plone. I checked the Products folder also and saw that the owner again was root. To change the owner of any file or folder I used the following command.
chown -R plone:plone Products
chown plone:plone Data.fs
The -R switch changes the owner on all folders and files below the top level folder so that I am now able to change the permissions in one shot.
Once that was done, I started my server again and found that it was working. And thought that all was OK. Apparently it was not. Zope started correctly, but when I tried to view my website, I got an error AttributeError: isDefaultPageInFolder. On looking at the log and searching the internet, I found out that the error was coming from global_defines.pt portlet which exists in the Products/CMFPlone/skins/plone_templates folder. Apparently this portlet has been modified in the latest release of Plone from the version that I was running (v2.5) and that was creating problems. I simply copied over the new file on the old one from the earlier backup that I had taken. Secondly the older Five product is not compatible with the new Zope release and you have to use the newer Five. Again I simply copied over the newer Five folder from the backup to the production location (See, I told you it was a good practice to backup before you make changes).
Once this copying was over, everything started working fine immediately. I don't think this is documented anywhere although there are some tickets in some support forums. However, you can spend a lot of time looking for the correct answer. I thought I would add my two cents to the open source community.
Running Zope on Fedora Core 6
Size
1997
-
File type
text/html
How to use re-write module of Apache web server 2.2.3 on FC6
Size
6071
-
File type
text/html
- Category(s)
- Linux
- Open Source
- The URL to Trackback this entry is:
- http://www.dharwadkar.com/weblog/migrate_site/tbping
