Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

Copy or move buildout to another user or computer

by Mikko Ohtamaa last modified Dec 03, 2009 03:05 AM
Instructions how to move buildout based instance from computer or UNIX account to another.

Preface

This how to tells how to move buildout (the whole buildout, not necessary individual site) from an UNIX user to another. The method described here is a simple file dump with some special notes you need to know.

These instructions do not cover Microsoft Windows operating system based installations.

You need basic UNIX system administration skills to follow these instructions.

The instructions assume that buildout is running as a local user (not root, no effective-user set in buildout.cfg).

Shutdown the target

Before copying, shutdown the existing Plone instance.

For plain Zope based installation:

bin/instance stop

For ZEO based installations:

bin/plonectl stop

Copying

Copy all files from a folder to another. Use cp command on the local machine or scp command when doing remote copy.

Example how to copy buildout /home/developer/testbuildout to /home/customer/:

sudo -i # go root

cp -r /home/developer/testbuildout /home/customer

Changing file permissions

Since the owner of the files will be changed you need to change the file ownership after the copying. Do this as root user:

cd /home/customer
chown -R customer:customer testbuildout

The buildout also contains hidden files ( .installed.cfg ) which need special chown handling:

find -iname ".*" | xargs chown -R customer:customer *

Re-bootstrap

Bootstrapping must be run again to generate bin/ scripts as they contain absolute file paths which are not up-to-date after moving.

This must not be done as root anymore.

sudo -i -u customer

python2.4 bootstrap.by # Plone 3 is Python 2.4 only

Buildout

After file ownership and bootstrap paths have been corrected you can rerun buildout to update absolute paths in other files.

But first you need to clear the previous buildout saved configuration as it contains absolute paths to files and folders (parts structure) which buildout rerun would try to uninstall (delete).

Buildout will also recompile native code libraries if there has been mix between 32-bit and 64-bit operating systems.

Remove configuration:

rm .installed.cfg

Then rerun buildout:

bin/buildout

Run

Time to try whether Zope starts after moving it.

For plain Zope based installation:

bin/instance fg # Start as a foreground to see errors

For ZEO:

bin/plonectl start

Test

Go to Zope administration interface with your browser http://yourhost:someport/

  • Check that the site front page comes up

Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.