Jump to content
We've recently updated our Privacy Statement, available here ×

rida_10

Recommended Posts

Good Morning,

Can we export a folder (containing reports) from one jasperserver to @ the development site to a jasperserver @ the site

of the customer so that instead of redefining each of the report i want to deploy, i can export them, and they'll be available

on  the customer site after importing that folder

thanks

Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

I referred to the jasper reports server chapter : configuring the import-export utilities but ididn't found an example

so have any one tried exporting reports, resources from one installation instance to another

Link to comment
Share on other sites

okay it worked with me export command as follows:

js-export --everything --output-dir=c:\jasper_bckup where the folder

c:\jasper_bckup is the export target .

 

Now, what is the import command so that i import resources on an Already installed jasper reports server.

Link to comment
Share on other sites

Have you tried js-import using the options listed in Import/Export chapter of the JasperReports Server Administrator Guide? Here is the information:

Usage: js-import [OPTIONS]

Reads a repository catalog from the your file system and creates the named resource in the JasperReports Server repository. The repository catalog must have been created with the

 

js-export command, either as a ZIP archive file or a directory:

Options in

js-import Command?

Option

Explanation

--help

Displays brief information about the available commands.

--include-access-events

Access events will be imported.

--input-dir

Path for importing a catalog from a directory.

--input-zip

Path and filename for importing a catalog from a zip file.

--update

Resources in the catalog replace those in the repository if their URIs and types match.

--skip-user-update

When used with --update, users in the catalog is not be imported or updated. Use this option to import catalogs without overwriting currently defined users.

 

Examples:

Import the myExport.zip catalog archive file:

js-import --input-zip myExport.zip

Import the myDir catalog folder, replacing existing resources if their URIs and types match those found in the catalog:

js-import --input-dir myDir --update

Import the myExport.zip catalog archive file but ignore any users found in the catalog:

js-import --input-zip myExport.zip --skip-user-update

Import the myDir catalog folder with access events:

js-import --input-zip myDir --include-access-events

The default behavior when a resource is found in the target repository that has the same URI as the resource that you are attempting to import is to skip the creation operation and leave the existing resource unchanged (no overwrite occurs). To delete the existing resource and replace it with a new one (of the same type and with the same URI), use the

--update option. Note that, if the resource in the export catalog is of a different type than the existing resource, the server returns an error and skips the update operation.

 

Link to comment
Share on other sites

thanks kahn for ur reply, and i downloaded the jasperreports adminstratation guid, and the export was done as expected but i faced one simple problem is that what if the resource that i want to export contains a space like content files , and i tried the following: js-export.bat --uris "/Content files" --output-dir=c:\jasper_bckup. and i received URI /Content files was not found in the repository
Link to comment
Share on other sites

You're very welcome! If the resource that you want to export contains a space like content files, try escaping the special characters, quote and forward slash, using the backslash, or try escaping only the forward slash character inside the quotes:

Post Edited by khahn at 05/06/2011 16:53



Post Edited by khahn at 05/06/2011 16:57



Post Edited by khahn at 05/06/2011 16:59
Link to comment
Share on other sites

I tried all combinations:

- js-export.bat --uris "\/Content files" --output-dir=c:\jasper_bckup3

- js-export.bat --uris \"\/Content files\" --output-dir=c:\jasper_bckup3

 

but it is not working !, i am using windows xp , did you tried it ur self?? I make a trivial work around by creating a folder whose name doesn't contains a space(input_parameters) and copy the content of a folder named: "input parameters" to it.

 

Best Regards

 

 

Link to comment
Share on other sites

Sorry the last suggestion didn't work. I learned you cannot use the name of the folder as an option to the js-export command. You must use the resource ID. Spaces are not allowed in resource IDs. The server converts them to underscore when you try to type a space in a resource ID.

To get the resource ID of a folder, click View > Repository. Right-click the name of the folder in the Folders panel, and choose Properties.



Post Edited by khahn at 05/09/2011 19:51
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...