Export, Import, or Migrate Advanced Reporting Content

You can move your Jaspersoft reporting content from a development environment to a test or production environment. You can move content from one Jaspersoft reports server to a newer version after an upgrade. You can also move content from more than one tenant across servers.
ccppmop152
You can move your Jaspersoft reporting content from a development environment to a test or production environment. You can move content from one Jaspersoft reports server to a newer version after an upgrade. You can also move content from more than one tenant across servers.
2
Prerequisites
  • Access Rights
    : This functionality is available only to users with the 
    Advanced Reporting – Administer
     access right. Migration does not require access to the system where the server is installed.
  • Review Dependencies
    : Jaspersoft Studio reports and views often have dependencies on other resources. These dependencies can include data sources, domains, input controls, queries, and language bundles. For example, a report might depend on images, input data types, and a data source. An exported report includes all dependencies even if they are stored in folders that were not selected during the export. The migration of content with dependencies also creates the same folder structure on the target server. The imported content replaces any existing resources on the target server.
Export Content
You can export individual resources or an entire folder of the repository. 
  1. Log in to the 
    CA PPM
     source environment.
  2. Click 
    Home
    Personal
    Advanced Reporting
    .
  3. Select 
    View
    Repository
    .
    You can export resources such as reports, ad hoc views, from a single folder. You can also export from the Library page.
  4. To select more than one resource, press the 
    Ctrl
     key. When viewing the repository, you can select an entire folder in the left panel.
  5. Right-click the selected folder or resources and select 
    Export
    .
    The Export Resources dialog appears:
    image2018-2-28 8:37:11.png
  6. (Optional) You can change the default name of the zip file.
  7. The export provides the following options for your release of Jaspersoft:
    Include report jobs
    : When checked, the export includes scheduled report jobs with any reports in your repository selection.
    Include repository permissions
    : When checked, the export includes any explicit permissions on all items in your repository selection. Clear this check box if you want the exported items to inherit the permissions of the target repository.
    Include dependencies
    : This option appears in Jaspersoft 6.4.2. When checked, the export includes any dependencies. Clear this check box to export resources and folders without full paths or dependencies, so that the resulting catalog can be imported by organization admins. In Jaspersoft 6.2.1, the export.zip contains all the dependencies.
  8. Click 
    Export
    . The server generates the zip file and your browser prompts you to save the file. Depending on the size of your repository and the selected options, it might take several minutes to generate the file.
! Resources are exported with their dependencies, even if the dependencies are not included in your selection. The export can be large and might take a long time to generate and then download. During this time, the export operation can affect server performance. For this reason we do not recommend exporting large amounts of data.
Import Content
After you export, you can import the exported zip file.
  1. Log in to the 
    CA PPM
     target environment.
  2. Click 
    Home
    Personal
    Advanced Reporting
    .
  3. Select 
    Manage
    Organizations
    .
  4. In the left panel, right-click the target organization and select 
    Import
    .
    The Import dialog appears:
    The image shows the Import to Org options
  5. Click 
    Browse
     to select the zip file to import.
    The dialog allows only the zip archive format. You can import only files created by the export.
  6. The import provides the following options:
    • 
    Update
    : When checked, the Update option imports only resources that are new to the current organization (different URI).
    • 
    Skip user updates
    : This option allows you to keep the current definition of any users that also exist in the imported organization, in case the exported zip file includes users.
    • 
    Include themes
    : When checked, the Include themes option imports any themes that exist in the imported organization.
  7. Click 
    Import
    . The server uploads the zip file and imports its contents into the organization. If there are any broken dependencies in the catalog, the server displays a message with three choices:
    • 
    Skip
    : This option does not import the resource with the broken dependency, but continues to import other resources.
    • 
    Include
    : Attempts to import the resource with the broken dependency. The import succeeds if there is already a resource in the destination that satisfies the dependency. If the dependency is not satisfied in the destination, the resource is skipped and the import continues.
    • 
    Cancel
    : Stops the import operation.
  8. (Optional) You can import into a different organization. If the source organization has a different ID than the target organization, the import merges the content of the export into the selected organization.
    The following message appears:
    The file being imported contains a top-level organization name that does not match the currently selected organization
    Import file: <source organization ID>
    Selected organizations: <target organization ID>
    Content is merged into <target organization ID>.
  9. Click 
    Continue Import
     to start the import. When merging organizations with the update option, the contents of the import override the target organization for any resource with the same name and location. The import might take a long time to upload and then process. During this time, the import operation can affect server performance. For this reason we do not recommend importing large amounts of data.
 
Export Jaspersoft Advanced Reporting Content Using the Command Line
Jaspersoft super users and tenant administrators can use the export command to export all Jaspersoft Advanced Reporting content from the JasperReports server (the same or a different instance).Your exported Jaspersoft Advanced Reporting content can include tenant level data, folders, reports, domains, input controls, roles, users, server settings, or the public folder.
Partial export of the Jaspersoft content is not supported with this command.
Do not use the export command (admin jaspersoft export) to create a content zip file for use in upgrading Jaspersoft. Export the tenant-level data from the Jaspersoft server using either the Jaspersoft UI (Manage, Server Settings, Export) or the Jaspersoft export command (js-export.bat in <JaspersoftInstaller>/buildomatic/).
Follow these steps:
  1. Stop the Jaspersoft server before using the export command.
  2. review any resource dependencies outside of the organization that can block the operation.
  3. Open a command prompt and go to 
    install directory
    /bin.
  4. Execute the following command:
    admin jaspersoft export [-orgName t1,t2,t3,..., tn] [-fileName zipfile name] [-includePublic=true]|[-includeServerSettings=true] -fromUserName <superuser> -fromPassword <superuser_password> -fromUrl <JSURL> -allOrgs -properties -overwrite
    • orgName
      : Specify the organization IDs of the tenants to be exported. Separate multiple IDs with commas. If this parameter does not include organization IDs, help information is displayed. Omit this parameter if you want to export only the public folder (or the server settings) and no tenants.
    • fileName
      : Enter the name of the zip file that you are exporting the Advanced Reporting content to. You can export single or multiple tenants to this file. You can specify a target directory path.
    • includePublic:
      (Optional)
       
      This parameter exports the public folders at the global level from the server. This parameter is not specific to a tenant, but applies to the source server (which encompasses all tenants on the source server).
    • includeServerSettings:
      (Optional)
       
      This parameter exports the server settings at the global level from the server. This parameter is not specific to a tenant, but applies to the source server (which encompasses all tenants on the source server).
    • fromUserName
      : Enter the super user Jaspersoft user name.
    • fromPassword
      : Enter the password for the Jaspersoft super user.
    • fromUrl
      : Provide the URL of the source server.
    • allOrgs
      : Exports all the organizations from the Jaspersoft report server.
    • properties
      : Specify the name of the properties file that contains the export command parameters. Use this option instead of specifying the parameters individually in the command.
    • overwrite
      : This parameter overwrites a previously created export zip file, if the file exists.
The export command fails in the following cases:
  • Required parameters are missing.
  • The include option folder name is not public (for example, you specify -includeTemp instead of -includePublic).
  • User credentials are not for the Jaspersoft super user.
  • The orgName parameter is included in the command, but tenants are not specified.
Import Jaspersoft Advanced Reporting Content Using the Command Line
Jaspersoft super users and tenant administrators can use the import command to import all Jaspersoft Advanced Reporting content from the JasperReports server (the same or a different instance).
 
1. You can only import the content if the organization IDs match between the export and import servers. You cannot import content that was exported from an organization with a different organization ID. 
2. You can only import the content zip file that has been exported using the command-line Export command.
  1. Stop the Jaspersoft Server.
  2. Open a command prompt at 
    install directory/bin
     
  3. Execute the following command:
admin jaspersoft import [-orgName t1,t2,t3,..., tn] [-fileName zipfile name] -toUserName <superuser> -toPassword <superuser_password> -toUrl <JSURL> -silent
    • orgName
      : Specify the organization IDs of the tenants to be imported. Separate multiple IDs with commas. If this parameter does not specify tenants, then all the tenants in the zip file are imported. 
    • fileName
      : Enter the name of the zip file that you are importing. If you do not specify a filename, help information is displayed.
    • toUserName
      : Enter the super user Jaspersoft user name.
    • toPassword
      : Enter the password for the Jaspersoft super user.
    • toUrl
      : Provide the URL of the target server.
    • silent
      : Permits the silent creation of tenants on the destination Jaspersoft report server. This parameter creates all tenants automatically on the destination Jaspersoft server. If you do not use this parameter, you are prompted to create the tenants.
If the tenant names in the orgName parameter and zip file do not match, the following hint appears:Tenant doesn't exist do you want to create? Y/N
  • Enter 
    Y
     to create new tenants and continue with the import.
  • Enter 
    N
     to cancel the import and exit. 
The partial import or export of Jaspersoft content is not supported with this command.
The import command fails in the following cases:
  • Required parameters are missing.
  • User credentials are not for the Jaspersoft super user.
  • Content zip file is corrupted.
  • An incorrect zip file (exported using the Jaspersoft UI or js-export.bat utility) is used for the import.
Migrate Jaspersoft Advanced Reporting Content
As a Jaspersoft administrator, you can export and import the Jaspersoft Advanced Reporting content. This content includes views, reports, custom domains, dashboards, and their dependencies. You can also migrate tenant level data, folders, reports, jobs, domains, input controls, roles, and users.These migration options are helpful when moving custom advanced reporting content between test and production environments.
To use these migration features and to update domain schema, apply Jaspersoft server cumulative patch 6.2.1_5.2.1.2.6.
The migrate command moves the Jaspersoft Advanced Reporting content to a different Jaspersoft server. 
You can only migrate Jaspersoft Advanced Reporting content if the source and destination servers have matching organization IDs. You cannot migrate content between organizations that have different organization IDs. 
Migration Example
You have an environment with a single Jaspersoft Reports Server that is shared by multiple 
CA PPM
 instances, or tenants. That is, on the same server, different organizations and tenants are provisioned, one for each instance. When the server needs to be updated to a newer version, 
all
 organizations and tenants on that server are upgraded. However, not all organizations and tenants on the current server may be ready to upgrade.In this case, you can complete an installation of Jaspersoft with the newer version on a different server, and then migrate the content of selected organizations and tenants from the existing server to the new server.
Follow these steps:
  1. Open a command prompt in the 
    install directory
    /bin and execute the following command:
    admin jaspersoft migrate [-orgName t1,t2,t3,..., tn] [-fileName zipfile name] [-includePublic=true]|[-includeServerSettings=true] -fromUserName <source user name> -fromPassword <source_password> -fromUrl <sourceURL> 
    -toUrl <destination url> 
    [-toUserName <destination user name>] [-toPassword <destination password>] -allOrgs -silent
    • orgName
      : Specify the organization IDs of the tenants to be migrated (separate multiple IDs with commas). If this parameter does not include organization IDs, help information is displayed. Omit this parameter if you want to migrate only the public folder (or the server settings) and no tenants. Use the allOrgs parameter instead of orgName to migrate all tenants.
    • includePublic:
      (Optional)
       
      This parameter migrates the public folders at the global level from the server. This parameter is not specific to a tenant, but applies to the source server (which encompasses all tenants on the source server).
    • includeServerSettings:
      (Optional)
       
      This parameter migrates the server settings at the global level from the server. This parameter is not specific to a tenant, but applies to the source server (which encompasses all tenants on the source server).
    • fromUserName
      : Enter the super user Jaspersoft user name for the source tenant.
    • fromPassword
      : Enter the password for the Jaspersoft super user for the source tenant.
    • fromUrl
      : Provide the URL of the source server.
    • toUrl
      :
      Provide the URL of the target server.
    • toUserName
      : Enter the super user Jaspersoft user name for the destination tenant.
    • toPassword
      : Enter the password for the Jaspersoft super user for the destination tenant.
    • allOrgs
      : This parameter migrates all tenants from the Jaspersoft report server.
    • silent
      : This parameter permits the silent creation of tenants on the destination Jaspersoft report server. This parameter creates all tenants automatically on the destination Jaspersoft server. If you do not use this parameter, you are prompted to create the tenants.
      If the tenant names in the orgName parameter and zip file do not match, the following hint appears:
      Tenant doesn't exist do you want to create? Y/N
      • Enter 
        Y
         to create new tenants and continue with the import.
      • Enter 
        N
         to cancel the import and exit. 
  2. Update the properties.xml file with the following information: 
    • Destination Jaspersoft URL 
    • Organization ID
  3. The exported set of folders and files include resources in the repository, such as reports and their dependencies. The exported content is compressed in a single zip archive file.
The content of the zip file is not intended for external access. The zip file contains files in several private formats. The XML syntax is not publicly available and the data files are not meant to be accessed.  
Synchronize the CA PPM Context with Jaspersoft
After you migrate (or import) content to a target tenant, you can change the user profile attributes or the domain schema name for the Jaspersoft administrator user. When content is moved from one Jaspersoft server to another Jaspersoft server in a different environment, the underlying 
CA PPM
 server is also different from the source. The database that the server connects to is also different from the source.This command adjusts the Jaspersoft configuration so that reports and other content work seamlessly. It synchronizes the 
CA PPM
 server and database details to the targeted Jaspersoft tenant. It also updates the target tenant with the user profile attributes and the domain schema name from the source 
CA PPM
 context for the Jaspersoft administrator user.
  1. Update the properties.xml file for the 
    CA PPM
     instance that connects to the targeted Jaspersoft server or tenant with the following information: 
    • Destination Jaspersoft URL 
    • Organization ID
  2. Select the target tenant name and user profile attribute values from the properties.xml file.
  3. If you did not already generate the key store file, do it now, before you run the syncPPMContext command.
  4. Run the following command from the 
    CA PPM
    target system after you import or migrate the tenant content:
    admin jaspersoft syncPPMContext -userName <username> -password <password>
    • username:
      Enter the superuser Jaspersoft user name for the Jaspersoft report server.
    • password:
      Enter the superuser Jaspersoft password for the Jaspersoft report server.
      Note
      : The migrate command fails if you include the syncPPMContext option and the credentials are not for the Jaspersoft super user.
  
View Database Schema Differences
Organization IDs and database schema names in the source environment are typically different from the target environment. You can view information about the organization ID and database schema names.
  1. Log in to 
    CA PPM
    .
  2. Select 
    Administration
    General Settings
    System Options
    .
  3. View the Advanced Reporting section. 
Update Domain Schema
When resources are imported to a target server where the database schema names are different from the source server, the resources do not work as expected. This behavior occurs when domains are imported, or are included in the import as a dependency. Domains keep references to the database schema from the source server. We recommend you to update the target server domain schema to eliminate any schema mismatch.
Follow these steps:
  1. Log in to CA PPM.
  2. Click 
    Home
    Personal
    Advanced Reporting
    .
  3. Select 
    Manage
    Update Domain Schema
    .
  4. Select the 
    Domain Name
     from the target server that requires an update.
  5. Select the 
    Domain Schema
     corresponding to the database accessed by the domain:
    • CA PPM Database Schema
      : Select this option for domains accessing the PPM transactional database.
    • Data Warehouse Database Schema
      : Select this option for domains accessing the Data Warehouse database. Select this option for all out-of-the-box domains included in the Advanced Reporting Content.
  6. Click 
    Update
    .
The following image shows a successful example:image2017-7-25 12:56:47.png