Monday, June 11, 2012

Plone Backup with Tivoli

We have now set up the web server backup on TSM. Plone is installed on a separate volume mounted on the VM. The Tivoli Client was installed on our VM and we had to make a couple of modifications to the dsm files.

/opt/tivoli/tsm/client/ba/bin/dsm.sys

specifies which server/port/address to connect to and the name of incl/excl file. It also specifies where to place the log files. We provided the server details and the name of incleclude file.

/opt/tivoli/tsm/client/ba/bin/dsm.opt

specifies the name of the server and the mount points. The Servername does not have to be defined in dsm.opt file but if it is, then it must match the servername in dsm.sys file.

The mount points are specified with the domain option. e.g.

domain /usr/local/Plone/

We can specify multiple domains separated by one or more spaces e.g.

domain /usr/local/Plone/ /home/myUsernmae/

Tivoli will backup all files under the specified domains. This may not be ideal as we might want to exclude some folders e.g. if we are backing up "/" we may not want to include "/tmp/" in our backup. 
We can specify the include-exclude list in dsm.opt file or we can create a separate file for the list and specify the path and filename in dsm.sys with inclexcl option.


Finally we set the daily cron job to run the incremental backup on tivoli as the following script:

#!/bin/sh
TIVOLIBIN=/opt/tivoli/tsm/client/ba/bin

48 5 * * * root $TIVOLIBIN/dsmc incr > /tmp/dsmc.log 2>&1 || cat /tmp/dsmc.log /var/log/dsmerror.log

Restoring Plone from backup

# dsmc
# dsmc> rest /path/to/Plone/* /path/to/restore/ -su=yes

We can omit the destination folder which will restore Plone to its original location and will overwrite everything that was previously there.

No comments:

Post a Comment