Backup and Restore documentation for the dotCMS Content Management System

To backup and restore dotCMS, it's recommended that you use external backup tools, as they provide the best and fastest results.

Performing a Backup

To completely backup dotCMS, you need to backup the following 6 resources:

  1. Your database
  2. Your Assets
    • /dotserver/tomcat-X.xx/webapps/ROOT/assets
  3. Your static Plugins folder
    • /plugins
    • Important:
      • If changes to your dotCMS configuration are properly configured via configuration plugin, this is the only folder you need to backup to ensure your configuration changes are saved.
      • If you've made configuration changes without using the configuration plugin, you will also need to manually backup all configuration files anywhere in the /dotserver hierarchy that you have changed.
  4. Your OSGI (dynamic) plugins folder
    • /dotserver/tomcat-8.0.18/webapps/ROOT/WEB-INF/felix/load
  5. Your ElasticSearch indexes
    • /dotserver/tomcat-X.xx/webapps/ROOT/dotsecure/esdata
  6. Your license files
    • /dotserver/tomcat-X.xx/webapps/ROOT/dotsecure/license.dat
    • /dotserver/tomcat-X.xx/webapps/ROOT/dotsecure/server_id.dat

Recommended Tools

You may choose any appropriate tool to backup each resource, but please keep in mind the following recommendations:

  • Make sure to use a database backup tool which is specifically designed for your database.
  • For file and folder backup, we recommend that you use tools which can provide a complete snapshot of both the properties and contents (including permissions, dates, and symbolic links), such as tar or rsync.
  • dotCMS provides command line tools to allow the backup of the running elasticsearch indexes.

Restoring from Backup

The following basic procedure can be used to restore your dotCMS installation from a previous backup.

Important: Even if your existing installation does not function properly, it is strongly recommended that you make a full backup of your existing installation before overwriting it with a backup. Please see Performing a Backup, above, for more information.

  1. Create a new dotCMS installation from the dotCMS distribution
    • Note: You must make sure that the version of dotCMS matches the version of dotCMS you performed a backup of.
  2. Restore your database
    • If a database exists with the same name as the backed up database, rename or drop (delete) the existing database.
    • Create a new database with the same name as the original database.
    • Restore your database backup into the new database.
  3. Restore the Assets directory from your backup
    • Copy the assets folder from your backup to /dotserver/tomcat-X.xx/webapps/ROOT/.
  4. Restore the static Plugins folder from your backup
    • Copy the /plugins folder from your backup to the root of the new dotCMS installation.
    • Important:
      • If all changes to your dotCMS configuration are properly configured via configuration plugin, this is the only folder you need to restore.
      • If you've made configuration changes without using the configuration plugin, you will also need to manually restore all configuration files anywhere in the /dotserver hierarchy that you changed.
  5. Restore the OSGI plugins folder from your backup
    • Copy the /dotserver/tomcat-8.0.18/webapps/ROOT/WEB-INF/felix/load folder from your backup to the same location in the new dotCMS installation.
  6. Restore the ElasticSearch index files from your backup
    • Copy the esdata folder from your backup to /dotserver/Tomcat-X.xx/webapps/ROOT/dotsecure/.
  7. Restore the license files from your backup.
    • Copy the license.dat and server_id.dat files from your backup to the /dotserver/Tomcat-X.xx/webapps/ROOT/dotsecure/.
  8. Redeploy your dotCMS plugins
    • Run the deploy-plugins script (from the root of the new dotCMS installation):
      • Linux:       bin/deploy-plugins.sh
      • Windows: bin\deploy-plugins.bat
  9. Start dotCMS
  10. Restore your Content Index
    • Once dotCMS is running, restore the content index through the admin panel or via the command line.