<%@ page isELIgnored="true" %> <%@ taglib uri="cms" prefix="cms" %> Backups of AnthillPro

Backups of AnthillPro

Regular backups of AnthillPro is advisable to protect your data. While AnthillPro supports automated backups with the Derby database (see Backups with Derby), other databases must be backed up using the backup tool that came with the particular database (see Backups with Other Databases).

The var\db directory should never be backed up with a file system backup (it is the location of the database files) because this will almost always result in file corruption.

  • Because the Agent does not store critical data (other than agent configurations), Agent upgrade is unnecessary.

Backups with Derby

AnthillPro supports scheduled backups of the Derby database through the UI, using a backup schedule. The backup interval will vary depending on the size of your organization, number of artifacts, etc. Backup schedules may be deactivated or changed on the Server Settings page. See Deactivate or Change Backup Schedule.

The var\db directory should never be backed up with a file system backup (it is the location of the Derby database files) because this will almost always result in file corruption.

Backups are saved in the var\db\backup directory (e.g., C:\AnthillPro\server\var\db\backup\). Every update will be named according to the date and time of the backup (in the format year-month-day_hour-minute-second; i.e., similar to 2008-10-08_10-59-48).

To restore AnthillPro to a clean state from backup files, overlay the installation with the backup files. See Restore AnthillPro to a Clean State.

  • Because the Agent does not store critical data (other than agent configurations), Agent upgrade is unnecessary.

Backup Prerequisites (Derby)

  • You must have read and write permissions to the System page. See Manage Security.

  • Before editing a backup setting, create a special schedule or use an existing schedule. See Create a Backup Schedule.

  • The var\db directory should never be backed up with a file system backup (it is the location of the Derby database files) because this will almost always result in file corruption.

Create a Backup Schedule (Derby)

  1. Go to System > Schedules under the Project Support menu.

  2. Click the Create Schedule button to create a new schedule.

  3. For backups, creating a basic schedule with a rather long interval works well. Select the Interval Schedule option and click Set.

  4. Configure the Schedule.

    • Name. the schedule.

    • Provide a description (optional).

    • Set the interval in minutes. An interval of 1,440 minutes will trigger a backup once a day.

    • Give the start time. Set the backup to start while system loads are low. A start time of 23:30 will trigger a backup to start at 11:30 p.m.

      Setting a start time is most useful for infrequent schedules, such as one that triggers twice a day, where the first daily execution dictates the second.

  5. Click Set.

Select Backup Schedule (Derby)

  1. Go to System > Backup Settings link under the Server menu.

  2. To manually backup AnthillPro, click the Backup Now button.

  3. To choose a schedule or change the number of stored backups, on the Main tab click the Edit button.

    • Backup Schedule. Select an existing schedule from the drop-down menu. See Create a Backup Schedule.

    • Max Backups. Enter the maximum number of backups that will be stored. Use -1 to keep all backups. If Max Backups is set to 25, AnthillPro will save the first 25 backups. When the 26th backup is created, AnthillPro will automatically delete the oldest backup.

      If reducing the number of backups stored, AnthillPro will delete all backups in excess of the new setting. For example, if changing backup storage from 25 to 20, the next time a backup runs AnthillPro will automatically remove the 6 (six) oldest backups and add the new backup.

    • Click Save.

  4. Select the Backups tab to view stored backups that can be restored or deleted. Backups are saved in the var\db directory (e.g., C:\AnthillPro\server\var\db\backup\). Every update will be named according to the date and time of the backup (in the format year-month-day_hour-minute-second; i.e., similar to 2008-10-08_10-59-48).

  5. Select the History tab for a list of database changes.

Deactivate or Change Backup Schedule (Derby)

When deactivating or changing a backup schedule, make sure that the schedule (created in Create a Backup Schedule) is not inadvertently deactivated or deleted. Because different AnthillPro activities may rely on a single schedule, deleting or deactivating the actual schedule (at System > Schedules) may effect other activities.

To deactivate or change the backup schedule:

  1. Go to System > Backup Settings link under the Server menu.

  2. Click Edit on the Backup Setting Main tab.

  3. To deactivate backups: Select None from the Backup Schedule drop-down menu to deactivate backups. When none is selected, no further backups will occur.

  4. To change to a different schedule: Select it from the drop-down menu. This may require creating a new schedule (see Create a Backup Schedule). One complete, a backup will occur when the new schedule fires.

  5. Click Save then Done.

Restore AnthillPro to a Clean State (Derby)

Restoring AnthillPro to a clean state requires overlaying the installation with backed-up data files. The directions outlined below are for backups of the embedded Derby database (see Backups with Derby). If using another database type, you must follow the procedures listed in the Backups with Other Databases section. Typically, restoring AnthillPro to a backed-up version is an option of last resort, and should only be used if there is no other way to correct an issue.

Note that restoration requires shutting down the server and agent(s).

  1. Shutdown the server and the agent(s).

  2. Go to the AnthillPro instance.

  3. In the var\db\ directory, rename the data folder. In Item 7, a copy of the backed-up data folder will be added (renaming the existing data folder reduces the chances of corruption).

  4. Go to the var\db\backup\ directory and open the appropriate backup folder. Every backup is identified in the format year-month-date_hour-minute-second (e.g., 2008-10-08_10-59-48).

  5. Open the backup you want to restore AnthillPro to, and copy the data folder located within the directory (e.g., the data folder is located in the var\db\backup\2008-10-08_10-59-48\ directory of a backup that was performed on October 8, 2008 at 10:59:48 a.m.).

  6. Go back to the var\db\ directory.

  7. Paste the backup's data folder into the var\db\ directory. Do not delete the old (renamed) data folder until you have verified that the restoration was successful.

  8. Restart the server and agent(s). Ensure that the restoration was successful. If there is a problem, please contact the AnthillPro support team with details.

Backups with Other Databases

If using AnthillPro with Oracle, MySQL, or Microsoft SQL Server database, backups are not performed through the AnthillPro UI. Each database has its own backup tool that should be used for backups (see documentation for your particular tool). The var/db directory should never be backed up with a file system backup (it is the location of the database files) because this will almost always result in corrupted files.

The following directories also need to be backed up using a file system backup tool:

Additional Directories to Backup (Non-derby)
FileContents
conf/ah3.keystoreServer keys for secure server/agent communication.
opt/tomcat/conf/tomcat.keystoreServer key for using HTTPS.
var/artifactsArtifacts published on Build Lives.
var/changelogChange logs published.
var/codestationCodestation project artifacts.
var/logAll logs for requests, workflows, jobs, steps and commands.
var/mavencacheRequired only if using the Maven integration.
var/publishedPublished reports on Build Lives
var/reportsRaw data reports used to create published reports.
  • Because the Agent does not store critical data (other than agent configurations), Agent upgrade is unnecessary.

To use a backed up database, see Using a Backed Up Non-derby Database.

Using a Backed Up Non-derby Database

  1. Perform a clean install of the AnthillPro server. See Installing AnthillPro.

  2. If the server is running, stop the server. Go to the \bin directory and run stop_ah3server.cmd for Windows; or ./ah3server stop for Linux/Unix.

  3. Open the installed.properties file located in the \conf\server directory.

    • The install.db.url=jdbc\: property must be changed to point to the backed up database. For example, install.db.url=jdbc\:yourdatabasetype\://localhost\:11366/data.

    • Save change.

  4. Open the base.xml file located in the \conf\spring-server directory. Modify two properties to point to the backed up database:

    • Under <!-- DataSource used for persistence -->, modify the 'url' property:

      <property name="url">
        <value>jdbc:yourdatabase://localhost:11366/data</value>
      </property>
    • Under <!-- DataSource used for identity generation so it does not create deadlocks -->, modify the 'url' property:

      <property name="url">
        <value>jdbc:yourdatabase://localhost:11366/data</value>
      </property>
    • Depending on how the new installation was completed, the 'username' and 'password' properties may also need to be changed in both locations:

      <property name="username">
        <value>anthill3</value>
      </property>
      
      <property name="password">
        <value>abc{}</value>
      </property>
    • Save changes.

  5. Copy over the directories that were backed up using the file system backup tool. See Additional Directories to Backup (Non-derby).

  6. Start the Server.