Topic: Copying a Kete site instance from one location to another

Topic type:

The steps involved in moving a Kete instance or cloning it.

This assumes two things:


  • you have run through and installed a fresh Kete instance with only the default data, this is referred to below as the "target"
  • you have an existing Kete instance with data (database, uploaded files, themes, etc.) that you want to copy or move to the target, referred to below as the "source"
I also assume that you have an understanding of how to do things like "dump your database" and only give an overview of steps that you can search the web for specifics of.  Keep in mind that some of the steps, particularly the ones with "rake" you may have to specify your RAILS_ENV in the arguments to the step.
Here's how to do it.
  • examine your source config/environment.rb, config/database.yml, config/backgroundrb.yml, and the files in config/initializers (pretty much only the load_system_settings.rb file) and see if there is anything that you may need, modify your target versions of the files as necessary
  • do a dump of the source database, for MySQL this uses "mysqldump", for PostgreSQL this is "pg_dump"
  • load it into an empty version of your target db, i.e. first empty your target db with something like "rake db:drop RAILS_ENV=production" and "rake db:create RAILS_ENV=production"  , then use your database program's client to load in your source's dump file, something like "mysql -u your_target_user -p your_target_app_name < your_dump_file.sql"
  • copy these directories' contents from public/ on the source Kete to public/ on the target Kete (some may not exist on in your source public directory, that is ok, just skip them)
    • audio
    • documents
    • image_files
    • themes
    • video
  • open a database client session to your new TARGET db and adjust the two rows of data to match your TARGET zebradb/keteaccess password and zebradb/conf/kete-zebra-servers.xml ports settings
  • restart Apache/Passenger with "touch tmp/restart.txt"
  • do the same for backgroundrb
 We're not quite finished yet.  We have to prime your Zebra search index databases still.  Follow these steps:
  • login as someone that has the tech admin role (default admin account has this role)
  • at the bottom of the page in the Administrator's Toolbox, click the Rebuild search databases link
  • for sites with small to medium amount of records (say up to 10,000), you are probably safe to use the defaults and just click Rebuild Search Databases
  • for sites that have larger amounts of records, you may want to skip private records

Discuss This Topic

There are 0 comments in this discussion.

join this discussion


Creative Commons Attribution-Share Alike 3.0 New Zealand License
Copying a Kete site instance from one location to another by Walter McGinnis is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License