Regular backups of AnthillPro is advisable to protect your data. As generally understood by the common public, having a backup of any digital data is vital for integrity & restoration of the chance a corruption might occur. Something as simple as a power surge could cause corruption, along with how data can be accidentally deleted, damaged by a virus or a hard disk failure, etc. This is one of the most important, yet also one of the most neglected areas of computing. Backing up your data should be at the top of your computer maintenance list; without data backup, you are running the risk of losing your data. And it will happen; don’t think that you don’t have to worry about it.
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. Backups are saved in the var\db\backup directory (e.g., %SERVER_HOME%\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).
PROTIP: You can click on History to see the list of previous database backups!
When deactivating or changing a backup schedule, make sure that the schedule is not inadvertently deactivated or deleted. Because different AnthillPro activities may rely on a single schedule, deleting or deactivating the actual schedule may effect other activities.
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. If using another database type, you cannot use most of the concepts in this 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).
KEEP IN MIND THAT ALL THE STEPS LISTED ABOVE ARE ONLY FOR CHANGING THE DATABASE STATES. In actuality, no other files are backed up, which leaves your previous build artifacts, codestation artifacts, job logs, test results, etc. at risk. To negate this, it is recommended to backup the entire anthillpro directory filesystem as well so that the filesystem can be restored to the same timeframe as the server.
Unfortunately, there are some cases that warrant a server not being able to have its entire filesystem backed up. The order of precedence on how to continue is thus:
Make sure that whichever method you choose, you have an archive of it, and be sure to TEST THE ARCHIVE after creation to verify its integrity. For example, if backing up the entire server filesystem using 7-zip, one's command might look like thus:
7z a -t7z -m0=LZMA2 -mx9 -md256m -ms=on -mmt2 %ARCHIVE_DIRECTORY%\backup.7z %SERVER_HOME%
It would be best to rename the old server installation (as to not lose the current file structure/contents if the unarchive should go awry) first before unarchiving a backup, but all you need to do is unarchive the backup into the %SERVER_HOME% directory. Then, your server's filesystem should be back in the state the archive was.
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 vendor's particular tool). Some examples are listed below:
KEEP IN MIND THAT ALL THE STEPS LISTED ABOVE ARE ONLY FOR CHANGING THE DATABASE STATES. In actuality, no other files are backed up, which leaves your previous build artifacts, codestation artifacts, job logs, test results, etc. at risk. To negate this, it is recommended to backup the entire anthillpro directory filesystem as well so that the filesystem can be restored to the same timeframe as the server.
Unfortunately, there are some cases that warrant a server not being able to have its entire filesystem backed up. The order of precedence on how to continue is thus:
Make sure that whichever method you choose, you have an archive of it, and be sure to TEST THE ARCHIVE after creation to verify its integrity. For example, if backing up the entire server filesystem using 7-zip, one's command might look like thus:
7z a -t7z -m0=LZMA2 -mx9 -md256m -ms=on -mmt2 %ARCHIVE_DIRECTORY%\backup.7z %SERVER_HOME%
It would be best to rename the old server installation (as to not lose the current file structure/contents if the unarchive should go awry) first before unarchiving a backup, but all you need to do is unarchive the backup into the %SERVER_HOME% directory. Then, your server's filesystem should be back in the state the archive was.
Please consult your database vendor's documentation for restoring databases.
These layouts are all assumed from the %SERVER_HOME% directory.
File | Contents |
---|---|
conf\ah3.keystore | Server keys for secure server/agent communication |
opt\tomcat\conf\tomcat.keystore | Server key for using HTTPS |
var\artifacts | Artifacts published on Build Lives. |
var\changelog | Change logs published. |
var\codestation | Codestation project artifacts. |
var\log | All logs for requests, workflows, jobs, steps and commands. |
var\mavencache | Required only if using the Maven integration. |
var\published | Published reports on Build Lives |
var\reports | Raw data reports used to create published reports. |
A lot of customers mistakenly use the import/export option of anthillpro to make "full backups" of their projects, library jobs, etc. While this may seem like a good idea, the fidelity & integrity of projects most likely will become compromised. Therefore it is recommended to do a database backup/clone if trying to copy projects to a new server. Exporting and importing projects is not meant for moving projects around from one server to another. It was included in AnthillPro primarily for debugging off of the production server, mainly for our needs in checking out customer project configurations etc., and is not intended for production.
Recently is has come to our attention that the out-of-date documentation stated that importing and exporting projects are perfectly safe. We strongly advise you to disregard what the documentation states and note the bugs that appear here in this section. A clone of the database is much more reliable than import/exports.
Examples of losses in fidelity and corruption in integrity include (but are not limited to):
com.urbancode.anthill3.domain.persistent.PersistenceException: Error inserting object in database: Cannot add or update a child row: a foreign key constraint fails (`anthill3`.`BUILD_PROFILE_ARTIFACT_DELIVER`, CONSTRAINT `BPAD_ARTIFACT_SET_FK` FOREIGN KEY (`ARTIFACT_SET_ID`) REFERENCES `ARTIFACT_SET` (`ID`))
The UI is generally a great place to start and see if any issues have arisen with the import of the project. If there are no additional details there, it is also possible the ah3server.out and ah3server.err have additional details. If after still consulting both of those places you cannot locate any details, it might still be possible that certain aspects of the import have different results. [h See the next section for some examples that could cause a general warning to be thrown].
The following will cause a general warning to be thrown, with no other details in the server logs and/or UI: