Notes Database Backup ZIP Agent

Notes Database Backup ZIP Agent

Use this code in a (scheduled) agent to zip a selected set of Notes databases to a backup location

  1. Replicate (or copy) databases to a temp directory
  2. Zip the newly created databases to a backup directory
  3. Cleanup the temp directory

To reduce complexity and set the main focus on the creation of replica’s and zip files, the following changes were made to the initial code:

  • only one hard-coded directory (Applications) is backed up in a zip file. You can change this in the code, extend the number of directories, exclude certain files, etc.
  • the logging of the agent was removed (text file in the backup directory)

This agent uses a LotusScript and a Java library

Java Library “zfmWrapper4LS”:

Import 2 files from this zip into the java library: zfmWrapper4LS.javalib:

  1. Create a Java Library with title: zfmWrapper4LS
  2. Import -> Archive -> ZipFileManager1_0.jar (from zip file above)
  3. Import -> Java Source -> (from zip file above)
  4. Delete
  5. base class -> zfmWrapper4LS.class

LotusScript Library “slBackup”:

Copy code below into a LotusScript library called “slBackup”

Scheduled Agent

Create a weekly scheduled agent, that calls the Backup sub from the slBackup library

Make sure to apply the correct Security settings (run on behalf of server, and allow restricted operations)