Appboard/2.4/admin/backup and recovery
A typical AppBoard deployment will consist of:
- application configuration: stacks, boards, widgets, users, domains, provisioning information etc...
- custom assets on the filesystem such as icons, logos, and additional configuration files.
- external supporting pieces required for operation but not strictly part of AppBoard, such as an additional external database, scripts, etc...
AppBoard provides a configurable export system which will automatically capture all system configuration (1) and much of the custom assets (2). If custom assets are not captured then the export configuration can be modified to include them which would be considered a deployment best practice.
As for external supporting pieces that's beyond the scope of the product itself but should be considered from a overall perspective.
Creating Backups
Creating backups is done by navigating to the System Administration builder mode, and selecting the Backup icon.
This page allows new backups to be created as well as existing backups on the server filesystem to be downloaded or deleted.
Select the Create button to create a new backup, the following options will be presented:
Backup Type | Description |
---|---|
Backup All | (recommended) This will backup everything and is typically the form of backup required even if only using AppBoard features. |
Backup AppBoard | This is a special purpose backup that will only export AppBoard content - see below for further information. |
Backup Portal | This is a special purpose backup that will export most server configuration and all enPortal configuration. |
Backup AppBoard Option
The Backup AppBoard option backs up only AppBoard components. When performing an AppBoard-only backup, only Stacks, Data Collections, and Data Sources are backed up. Users, Domains, Roles, Stack assignments, and managed variables are not included with the backup. As a result, do not use the portal Restore command with an appboard-only archive as the Restore command resets the database and you may lose user/role/variable and all enPortal configuration.
If you are trying to get a complete system backup and restore, then use the full Backup All backup and restore method, not the AppBoard-only backup. To load an AppBoard-only backup over an existing installation, then use the portal FilesImport command instead of portal Restore. It will also be necessary to perform an additional step to ensure data source modifications are loaded:
- Shut down AppBoard.
- On the command line in the destination system, go to ...\server\bin\.
- Enter the command: portal FilesImport -jar <appboard-only-archive.jar>.
- Change into the ...\server\webapps\enportal\WEB-INF\xmlroot\appboard\ directory.
- Rename load-restore.txt.disabled to load-restore.txt.
- Start AppBoard.
Restore
The restore process enables you to install a new version of AppBoard/enPortal and restore your previous data and configurations.
How To Restore AppBoard/enPortal
- Shut down AppBoard.
- On the command line in the destination system, go to \server\bin\.
- Enter one of the following commands:
- Portal restore –jar ..\webapps\enportal\WEB-INF\archive\<name of backup jar file>
- The "restore" command is intended for doing a complete rebuild of AppBoard, such as when you are migrating AppBoard to a new server or upgrading to a new AppBoard version. It will copy all of the files from the archive JAR on to the destination server where you are running the command.
- Portal apply –jar ..\webapps\enportal\WEB-INF\archive\<name of backup jar file>
- The "apply" command skips over copying some of the config files from the archive JAR. It can be used, for example, if you are loading an archive on to a test server and you do not want the command to extract all of the system configuration settings and wipe out the local settings that are in place (for example, the license file). The list of files that is skipped by the apply command can be seen (and configured) in [INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/export.properties under the section labeled "import.skip.apply".
- Portal restore –jar ..\webapps\enportal\WEB-INF\archive\<name of backup jar file>
- Enter “yes” to confirm replacing any existing content.
- Start AppBoard and confirm that the exported content was loaded successfully.
Deciding Whether To Use the "Apply" or "Restore" Command
When to use "portal apply":
- You do not want any customization to affect your local /server/bin/setenv-custom scripts (port overrides; memory settings, etc).
- You do not want /server/webapps/enportal/WEB-INF/config/license.properties or any license.* files to affect your local server settings.
- You do not want SSL configuration changes in /server/conf/ to affect your local server settings.
- You only want elements such as Stacks, Channels, Users, or personalizations to be imported.
When to use "portal restore":
- You want the restore to truly mirror the full configuration from the original server where the backup archive was created.
Note: In both cases (portal restore and portal apply), the command will reset the database. Once started, the system will only load the stock configurations plus the configurations imported by the overlay.
Advanced Configuration
The set of files that are included in the backup archive is configured in the file [INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/export-appboard.properties and [INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/export.properties. You can customize the process by adding files to be included in the backup archive. To do so, create a file called custom.properties, and include any custom export commands.
The following is a sample customization block that could be added to custom.properties:
[xml,N]
- Backup custom theme
export.custom.other=${webapp.webinf}/xmlroot/appboard/config/themes.xml;\
${webapp.home}/visualizer/assets/images/backgrounds/bg-red_1600.png;\
${webapp.home}/visualizer/assets/images/my_banner.png;\
${webapp.home}/login_pages/edgeLight/images/logo.png;\
${webapp.webinf}/lib/db2jcc.jar;\
${webapp.webinf}/lib/db2jcc_license_cu.jar;\
${webapp.home}/version.jsp;\
${webapp.webinf}/groovy-script/TrimSiteCode.groovy;
export-appboard.data=${webapp.webinf}/data
Troubleshooting
- Issue: When restoring an archive, you receive the following message in the console: System must be shutdown prior to resetting the database.
- Possible Causes:
- AppBoard is still running. Make sure AppBoard is shut down prior to running the restore command.
- The system was improperly shut down and there is a lock file in the H2 folder (/server/webapps/enportal/WEB-INF/h2/). Delete the lock file (persist.lock.db) and run the restore command again.