Backing up Wikis data 

Wikis stores data in both the database and a file system. This adds some complication when backing up data while keeping the application available to users.

Before you begin

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.

About this task

Wikis stores a large amount of data. If it were only stored in a database, maintenance and backups would be complex and costly. To prevent this, Wikis only stores file meta-data in the database, and stores binary files in a data directory on a file system. You specify this directory during IBM Connections installation, and you can find it at any time in the wikis-config.xml properties file in the element.

The element will contain either the path itself, or a WAS variable whose value is the path. If it contains a variable, you can find the path by opening the WAS console, clicking Environment -> WebSphere Variables, and finding the variable. For example, if the element's value is ${WIKIS_CONTENT_DIR}, find WIKIS_CONTENT_DIR in the console to find the path. See the topic Change configuration property values for information on opening the wikis-config.xml file.

File data is actually stored in unique directories below a <files_storage_root_directory>/files directory. Each file's data is stored in a sub-directory below /files, generated from the file's randomly generated UUID. Part of the UUID is used to create a directory with a number between 0 and 127. Another part is used to create a directory below that, with another number between 0 and 127, and the UUID itself is located in that directory. For example:


Files are only written once, so their identities are clear if one is missing during a restore.

This storage architecture means maintain consistency between the database and file system during backups. The simplest way to maintain consistency is to perform "off-line" backups, making the application inaccessible and then backing up both locations. But often you will want to perform "on-line" backups, keeping the application accessible. During an on-line backup, users can continue to add and delete content from the application.

During on-line backups of Wikis, back up the database before the file system. The database enforces transactional integrity between the two locations. If you back up the file system first, files added between the time the file system backup starts and the database backup later completes will be missing from the file system on restoration. Backing up the database first ensures that you capture all new files during backup.

You must also stop a file-deletion task from running during on-line backup. When a user deletes a file it is removed from the user interface, but the application actually adds it to a queue of files that must be deleted from the file system. This task runs regularly to delete the top item from the queue. You can also increase the time files can sit in the queue before they are deleted, by adjusting the value in the scheduledTasks.FileActuallyDelete.args.softDeleteMinimumPendingTimeInMins property in wikis-config.xml. This could give you enough time to run incremental backups and make sure your archive is never missing data. For information on editing wikis-config.xml, see the topic Change configuration property values. For information on the scheduledTasks.FileActuallyDelete.args.softDeleteMinimumPendingTimeInMins property see the topic Wikis configuration properties.

To perform an on-line backup of Wikis complete the following steps:


  1. Start the wsadmin client.

  2. Start the Wikis Jython script interpreter using the following command:


  3. Stop the task that deletes files from the queue with the following command:


  4. Back up the database according to the database documentation.

  5. Back up the file system in whatever way makes sense in your environment. For example, for small deployments you can just zip the system, or for large deployments you can use a tool like Tivoli Storage Manager.

  6. Start the task that deletes files from the queue with the following command:


What to do next

You can run a task that checks for inconsistencies between the database and the file system. It might be useful to compare database and file system images in a test environment before restoring them. See the topic Checking Wikis data integrity for more information.

Parent topic

Administer Wikis

Related concepts
Backing up and restoring data

Related tasks

Starting the wsadmin client
Change Wikis configuration property values

Related reference
Wikis administrative commands
Wikis configuration properties