19.7. Restore

If you need to restore your Perforce Chronicle installation, please use the appropriate recipe below. Below, backup files are assumed to be in a path referred to as BACKUPDIR. CMSDIR refers to the root directory of your Chronicle installation.

The following recipes assume that:

First, stop your Apache web server:
apachectl stop

Then choose one of the restoration recipes below. At the end of this document are common restoration steps.

19.7.1. Restore Chronicle with Perforce Server on Same Machine

Backup files are assumed to be in a path referred to as BACKUPDIR. CMSDIR refers to the root directory of your Chronicle installation.

  1. Change the current working directory:

    cd CMSDIR
    cd ..

  2. Move the existing installation out of the way:

    mv CMSDIR CMSDIR.old

  3. Extract the contents of a previously created TAR archive:

    tar -xzf BACKUPDIR/<Chronicle backup file>

  4. Determine the checkpoint_file and journal_file to restore from:

    ls CMSDIR/data/perforce/checkpoint* CMSDIR/data/perforce/journal*

  5. Restore from the checkpoint/journal files identified above:

    p4d -r CMSDIR/data/perforce -jr checkpoint_file journal_file

  6. Verify the integrity of your server:

    p4 -p "rsh:p4d -ir CMSDIR/data/perforce" -u ADMINUSER -P ADMINPW verify -q //...

    If you encounter errors from this step, please refer to MISSING! errors from p4 verify, or How to Handle p4 verify BAD Errors, from the Perforce Knowledge Base.

  7. Ensure that the database files are writable by the web server user:

    chmod u+w CMSDIR/data/perforce/db.* CMSDIR/data/perforce/journal*
    chown WEBUSER CMSDIR/data/perforce/db.* CMSDIR/data/perforce/journal*

  8. Perform the common restoration steps.

19.7.2. Restore Chronicle Using an Existing Chronicle Server

There are two restorations that need to be performed: the Perforce server and the Chronicle installation.

19.7.2.1. On the Perforce Server

Please follow the recovery steps presented in Supporting Perforce: Backup and Recovery.

19.7.2.2. On the Chronicle Server

Before you begin, it is helpful to pick the path where the backup will be stored; this path is referred to as BACKUPDIR below. CMSDIR refers to the root directory of your Chronicle installation.

  1. Change the current working directory:

    cd CMSDIR
    cd ..

  2. Move the existing installation out of the way:

    mv CMSDIR CMSDIR.old

  3. Extract the contents of a previously created TAR archive:

    tar -xzf BACKUPDIR/<Chronicle backup file>

19.7.3. Common Restoration Steps

  1. Clear the cache:

    cd CMSDIR/data/cache
    rm -rf default/* global/* page/*
    cd CMSDIR/data/resources
    rm -rf *gz

  2. Clear the search indexes, if they exist:

    cd CMSDIR/data/sites
    find . -type d -name 'search-index' | xargs rm -rf

  3. Restart Apache:

    apachectl start

  4. If the Search module is enabled, the search indexes need to be rebuilt:

    1. Login to Chronicle.
    2. Visit Manage > Search Settings. The Manage Search screen is displayed.
    3. Click Rebuild to rebuild the search indexes.
Perforce Chronicle - Release: 2012.2/486814