Appboard/old/backup and restore: Difference between revisions

imported>Mike.berman
(created page)
 
imported>Mike.berman
(update to reflect simplified procedures in 2.2.x)
Line 1: Line 1:
{{Note|The instructions on this page are for versions 2.1.x of AppBoard.  For versions 2.0.x of AppBoard, please see [[Backup_and_Restore_2.0.x|Backup and Restore 2.0.x]].}}
{{Note|The instructions on this page are for versions 2.2.x of AppBoard.  For versions 2.1.x of AppBoard, please see [[Backup_and_Restore_2.1.x|Backup and Restore 2.1.x]].  For versions 2.0.x of AppBoard, please see [[Backup_and_Restore_2.0.x|Backup and Restore 2.0.x]].}}


AppBoard/enPortal provides utilities for backing up and restoring system data and configuration settings.  This page details the commands and procedures for managing this aspect of the system.
AppBoard/enPortal provides utilities for backing up and restoring system data and configuration settings.  This page details the commands and procedures for managing this aspect of the system.
Line 14: Line 14:




In order to perform a backup, it is first helpful to understand the relevant file locations and commands.
===How To Create a Backup===




===Backup File Locations===
Perform the following steps to create a full backup of AppBoard/enPortal:




{| class="wikitable" border="1" style="background-color:#eeeeee;"
# On the original AppBoard system, log in to AppBoard as administrator
|+ align="bottom" style="color:#e76700;" |''Backup File Locations''
# Under <b>Builder Modes</b>, select <b>Settings</b>
|-
# Under <b>System Settings</b>, select <b>Backup</b>
! width="150" | Directory
# Click <b>Create</b>
! width="150" | Description
# Select <b>Backup All</b> and click <b>Create Backup</b>
|-
# Observe JAR file created in <tt>\server\webapps\enportal\WEB-INF\archive\</tt>
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content/</tt>
| XML files representing all of the stock (original) enPortal content that was installed into the database to provide the base system definitions and content.  Includes stock content for any Product Integration Modules (PIMs) that you have loaded into the system.  This directory is created the first time you start the system, by copying the default installation files from <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content-autoload/</tt>
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content-backup/</tt>
| The /content-backup/ directory is identical to the /content/ directory, except it also includes all of the changes you have made in the system.  This directory is created when the XMLExport command is run by an administrator.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters/</tt>
| XML files representing all of the stock (original) AppBoard content that was installed into the database to provide the base system definitions and content.  This directory is created the first time you start the system, by copying the default installation files from <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters-autoload/</tt>
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters-backup/</tt>
| The /adapters-backup/ directory is identical to the /adapters/ directory, except it also includes all of the changes you have made in the system.  This directory is created when the AppBoard Backup command is run by an administrator.
|-
| <tt>/server/webapps/enportal/WEB-INF/archive/archive-&lt;DATE&gt;.jar</tt>
| The backup / archive generated from the Backup page in enPortal or AppBoard.
|}


===How To Create a Backup===


Perform the following steps to create a full backup of AppBoard/enPortal:
==Restore==


# Navigate to '''Advanced'''->'''Backup''' (enPortal) or '''Settings'''->'''Backup/Restore''' (AppBoard Builder).
The restore process enables you to install a new version of AppBoard/enPortal and restore your previous data and configurations.
# Select '''Create'''


After completing the above commands, copy the entire AppBoard/enPortal file system to the backup server.


==Restore==
===How To Restore AppBoard/enPortal===


The restore process enables you to install a new version of AppBoard/enPortal and restore your previous data and configurations.
# Shut down AppBoard
# On the command line in the destination system, go to <tt>\server\bin\</tt>
# Enter the command:
#:  <tt>Portal restore –jar ..\webapps\enportal\WEB-INF\archive\<<i>name of backup jar file</i>></tt>
# Enter “yes” to confirm replacing any existing content
# Start AppBoard and confirm that the exported content was loaded successfully




===Restore File Locations===
{{Note|The license file is included in the JAR file that is created by the backup.  After executing a restore, you may need to manually replace the license file on the destination server with the appropriate file for that server.}}


{| class="wikitable" border="1" style="background-color:#eeeeee;"
|+ align="bottom" style="color:#e76700;" |''Restore File Locations''
|-
! width="150" | Directory
! width="150" | Description
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/</tt>
| Files in this directory are invoked whenever the AppBoard/enPortal server is started (by the startup command).  Any file in this directory that begins with "load" identifies sets of enPortal XML content to be loaded into the system database, which will be executed unless the file contains a ".disabled" or ".completed" extension.  When restoring the system, you can edit these filenames to control what content will get loaded into the database.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content-backup/</tt>
| This is the full system backup directory, which will be loaded at server startup if the load file <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/load_restore.txt</tt> is not disabled.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content-autoload/</tt>
| Any XML files in this directory, or any sub-directories, will be loaded into the system database the next time the server is started.  The files will then be moved into <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/content/</tt>.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/</tt>
| Files in this directory are invoked whenever the AppBoard/enPortal server is started (by the startup command).  Any file in this directory that begins with "load" identifies sets of AppBoard XML content to be loaded into the system database, which will be executed unless the file contains a ".disabled" or ".completed" extension.  When restoring the system, you can edit these filenames to control what content will get loaded into the database.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters-backup/</tt>
| This is the AppBoard data sources and adapters backup directory, which will be loaded at server startup if the load file <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/load_restore.txt</tt> is not disabled.
|-
| <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters-autoload/</tt>
| Any XML files in this directory, or any sub-directories, will be loaded into the system database the next time the server is started.  The files will then be moved into <tt>/server/webapps/enportal/WEB-INF/xmlroot/appboard/adapters/</tt>.
|}


== Advanced Configuration ==


===Restore Commands===
The set of files that are included in the backup archive is configured in the file <tt>[INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/export-appboard.properties</tt>.  You can customize the process by adding files to be included in the backup archive.  To do so, create a file called <tt>custom.properties</tt>, and include any custom export commands.




{| class="wikitable" border="1" style="background-color:#eeeeee;"
The following is a sample customization block that could be added to <tt>custom.properties</tt>:
|+ align="bottom" style="color:#e76700;" |''Restore Commands''
|-
! width="150" | Command
! width="150" | How To Run
! width="150" | Result
|-
| DBReset
| Shut down the system, then go to <tt>/server/webapps/enportal/WEB-INF/bin/</tt> and run:<br>
<tt>> portal DBreset</tt>.  Enter "y" to reset the load files so the backup content will be loaded upon system startup.
| Clears all configuration data from the system database, so that the backup data can be re-loaded into the system.
|-
| FilesImport
| Go to <tt>/server/webapps/enportal/WEB-INF/bin/</tt> and run:<br>
<tt>> portal filesImport -jar <i>YourJarFileName</i></tt>
| Extracts saved configuration files from a jar file to the proper location in the current system.
|}


<code>[xml,N]
# Backup custom theme


===How To Restore AppBoard/enPortal===
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;


# On the previous system, run the backup command to generate the <tt>appboard-archive.jar</tt> file
export-appboard.data=${webapp.webinf}/data
# Stop AppBoard/enPortal.
</code>
# Steps needed for a new installation only:
## Install the new version of AppBoard/enPortal.
## Copy the <tt>appboard-archive.jar</tt> file to the new file system under <tt>/server/webapps/enportal/WEB-INF/bin/appboard-archive.jar</tt>
## In a console, go to <tt>/server/webapps/enportal/WEB-INF/bin/</tt> and run the following command to import the files on to the new installation:
#:  <tt>> portal FilesImport -jar appboard-archive.jar</tt>
# Ensure that the file <tt>/server/webapps/enportal/WEB-INF/xmlroot/server/load_restore.txt</tt> does not have the ".disabled" extension.
# Run the DBReset command to clear out the system database (not needed for a new installation).
# Start AppBoard/enPortal

Revision as of 20:16, 16 May 2012

Template-note.png
The instructions on this page are for versions 2.2.x of AppBoard. For versions 2.1.x of AppBoard, please see Backup and Restore 2.1.x. For versions 2.0.x of AppBoard, please see Backup and Restore 2.0.x.

AppBoard/enPortal provides utilities for backing up and restoring system data and configuration settings. This page details the commands and procedures for managing this aspect of the system.


Backup

There are several reasons that the AppBoard/enPortal administrator may need to create a backup of the system:


  • Migrating a system from development to production, or from one physical location to another
  • Upgrading the system to a newer version
  • Creating a regular backup to have available in case the system ceases to function properly


How To Create a Backup

Perform the following steps to create a full backup of AppBoard/enPortal:


  1. On the original AppBoard system, log in to AppBoard as administrator
  2. Under Builder Modes, select Settings
  3. Under System Settings, select Backup
  4. Click Create
  5. Select Backup All and click Create Backup
  6. Observe JAR file created in \server\webapps\enportal\WEB-INF\archive\


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

  1. Shut down AppBoard
  2. On the command line in the destination system, go to \server\bin\
  3. Enter the command:
    Portal restore –jar ..\webapps\enportal\WEB-INF\archive\<name of backup jar file>
  4. Enter “yes” to confirm replacing any existing content
  5. Start AppBoard and confirm that the exported content was loaded successfully


Template-note.png
The license file is included in the JAR file that is created by the backup. After executing a restore, you may need to manually replace the license file on the destination server with the appropriate file for that server.


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. 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]

  1. 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