This page is about the import and export of single entities in the PocketQuery administration. If you want to export all of your entities at once for backup or migration, that can be done by a Confluence administrator in the . at the section "PocketQuery"
Content of this page
Export and import of single entities can be done by any PocketQuery administrator or editor, but are limited to the entity types the user is allowed to maintain. A PocketQuery editor cannot import or export a datasource.
For security reasons, the password or datasources will be censored by replacing each letter with an asteriks. This also happens if you export datasources by themselves. For this reason you will have to reenter the passwords to your datasources manually after importing them.
You can export entities by clicking on "Export" when viewing them. Once you clicked the button you will automatically download an XML file containing your entity.
Related Entities of Queries
Notice that when you export queries you will be asked whether you want the related entities to be be included. Choosing "yes" will create an export that contains not only the query, but also the template, converter and datasource it uses. (For PocketQuery editors the datasource will be left out.)
Here is an example export including the related entities for the query shown in the first picture:
To import your entities switch to the "Import" tab in the PocketQuery administration. Choose the file you want to import and click the "Import" button.
If your import is successful you will be greeted by a message and are now able to use your imported entities.
If you are trying to import an entity that already exists, as default there will be a number attached to the name of your imported entity. E.g. if you are trying to import a template with the name "my-template" but there already is a template with this name, the newly imported template will be saved as "my-template-2". If you instead want to override the existing entity, you can enable "Override mode".
Keep in mind that overridden entities can not be restored.
The following errors can occur while importing entities and will cancel the import:
- Your file is broken or contains invalid XML.
- Your import contains a datasource but you are not permitted to maintain datasources. (I.e. you are a PocketQuery editor.)
- You are trying to import a query that uses a template, converter or datasource that does not exist (and is not included in the export).
- The entity you are trying to import is not valid. Maybe its name contains prohibited symbols or a required attribute is missing.