Terracotta 10.11 | Terracotta Server Administration Guide | Backup, Restore and Data Migration | Restore
 
Restore
The restore operation is a manual operation. During the Restore operation, you use standard operating system mechanisms to copy the complete structure (directories, subdirectories and files) of the backup into the original location. Some small structural and/or naming changes are required in the restored directories after the copy, as described in the sections below.
Note:
Restoring cache data will bring back cache entries which might have become stale by the time a restore is finished.
Performing a Restore
Before you start the Restore operation, ensure that all activity has stopped on the cluster and that the cluster is not running.
If you compare the structure of the backup under /tmp/backup1 with the original structure under /tmp/data1 (see both structural diagrams above), you will see some differences. You will also see that this is a single stripe cluster. Therefore, when you copy the /tmp/backup1/<backup-name> directory structure back to /tmp/data1, you need to make the following changes:
1. First choose a server as the active server for your stripe.
2. Note down the name of that server.
3. Create an empty directory for each path specified by the data directory. This will be the target directory for your restored data. Repeat this step for every data directory path specified in your config file.
4. Create a sub-directory with the name of the server under the data directories created above. For example, if the name attribute is server-2 for the chosen active server for this stripe and the location specified for the data directory datadir is /tmp/data1, your target directory should look like /tmp/data1/server-2.
5. From the backup, copy the contents of <server-name>/<data-directory> to this newly created directory. For example, in the example given above, copy from /tmp/backup1/<backup-name>/server-1/data to /tmp/data1/server-2
6. Start the server with the newly created data directory with the config file which was backed up from the original cluster.
7. You can now bring up the passive servers in the stripe. Please note that you don't need to copy the backup data to the passive servers as they will automatically receive the data when they synchronize with the active server. It is advisable to remove any old data on the passive servers before you bring up the passive servers.
8. Repeat the above steps for other stripes in the cluster.