Most Powerful Open Source ERP

How To Clone ERP5 Instance

How To showing how create a copy of a running ERP5 instance.
  • Last Update:2016-02-09
  • Version:001
  • Language:en

Table of Contents

Steps

Here are the steps to clone an existing instance, for example to develop on a copy of an existing instance:

  • Create a new empty instance using /usr/lib/erp5/bin/mkzopeinstance.py
  • Change the port in etc/zope/conf, this is "address" in "http-server" section. In this example we'll use port 18080
  • Copy products, or make a new checkout from subversion, or products from software home (installed by RPMs)
  • Copy Extensions, Document, PropertySheets, Constraint and tests directories in the new instance
  • Create a new database for the instance, for example using using mysql command
  • Start the instance with "bin/zopectl fg"
  • Go to ZMI http://localhost:18080/erp5/portal_activities/manageLoadBalancing and configure for your new instance. If you are using one single instance (and not ZEO), your new instance must be in "Distributing Node" and must be the only one in "Processing nodes". This means you have to remove existing ones.
  • If you use portal_alarms, also update http://localhost:18080/erp5/portal_alarms/manageAlarmNode
  • Again using the ZMI, change connections strings to use your new mysql database. Do this for all "Z MySQL Database Connection" objects, ie. cmf_activity_sql_connection, erp5_sql_connection, erp5_sql_deferred_connection and erp5_sql_transactionless_connection. Be carefull, erp5_sql_transactionless_connection uses a different connection string, it's prefixed by -
  • Create activities tables, using the "Recreate Tables" button from http://localhost:18080/erp5/portal_activities/manageActivitiesAdvanced
  • Reindex your site in your new mysql database, by using this script
    • http://localhost:18080/erp5/ERP5Site_reindexAll?clear_catalog:int=1
  • You can also use mysqldump if you don't want to wait.

Related Articles