The Mango Admin Tool is a stand-alone tool for exporting and importing data. It was first delivered in Smart Office 10.1 and is continuously enhanced as we create more tables in the database. The 10.1 version works with 10.0.5.4 as well and is used for migrating data from 10.0.5.4 to 10.1 since 10.1 is a new install. The tool (MangopAdminTool.zip) is located in the AdditionalFiles folder in the download package. You can unzip the tool in a folder on the server or on your client PC. Please note that it has the same .Net 4.5 requirement as Smart Office.
Hints, tips and recommendations
- You need to be a Smart Office administrator to run the Mango Admin tool.
- The Mango Admin tool should only be used during a service window.
- Roamed files can get very large. It is recommended to do the export in two steps. First all but the roamed files and then the roamed files.
- Check the MangoServer log as it will print out when the export/import is started and completed
- If you get the exception below – this does not mean that there is an error:
System.AggregateException: One or more errors occurred. —> System.Threading.Tasks.TaskCanceledException: A task was canceled.
It is caused by a timeout in the tool because there was no reply from the server. The timeout is specified in a config file next to the tool, see How to change tool settings.
- Only run one export/import at a time. There are versions of Smart Office that does not check for concurrent request especially if you get the exception above you must check the log for completion in versions prior to 10.2 HF3.
- If you would like to take a backup you should use the Management tools provided by the database provider for the database that Smart Office uses instead of this tool.
Adding a server configuration
You can use the same tool to run against different servers. You need to enter a configuration per server. The first time the tool is started you will see the dialog below. This dialog can later be opened by clicking the configuration menu in the upper left corner of the application.
- Press the plus sign to create a new server configuration.
- Enter a name for the configuration
- Enter the Server Uri in the format https://server.company.com:4000
- Press OK to save the configuration
- Back in the Select Server Configuration dialog press OK again to select the server you created
- Once a server configuration is selected you will see the name of the server configuration in the application window title
Entering a user for logon
You can click the User button to enter an administrator user and password that will be used to connect to the Smart Office server or you can continue using the tool and when the tool needs to connect to the server you will get a login prompt. Please note that the user needs to be a Smart Office Administrator and that the same user will be used throughout the session even if you change server configuration.
Using filters and selecting categories
There are three icon buttons that can be used for selecting / deselecting all categories for import/export. There is also a filter button that will clear all filters.
The filter field supports exact matches and start (*) matches. For example entering a user filter test* and checking the ‘Roamed files’ will export all settings, canvas etc. for all users with a user id that starts with test.
How to change Mango Admin Tool settings and reuse configuration
If you have started the Mango Admin Tool a MangoAdminToolSettings.xml file will be created in the same folder as the tool. It contains a list of settings for the tool as well as the last used filters etc and can be edited in a text editor.
This file contains a block with the added Configurations so it is safe to copy the configurations you have for a previous version of Smart Office to a new one by copying the Configurations block.
There is one setting for the timeout in the tool – that is how long the tool will wait for a reply while the export or import is done. The setting is RequestTimeoutSeconds and if you experience timeouts you can change this to a higher value – or split your export/import in chunks.
Import / Export categories
The Mango Admin tool is for exporting and importing different data categories of data that is stored in the Smart Office server’s database.
All filter fields can take the following input:
- A name, for example a file name. For example: Profile.xml
- A semicolon separated list. For example: CRMgen.mashup,Items.mashup
- A simple wildcard expression. For example: *storage.xml
Default canvas files
Canvas files that can be configured for first time users in settings is stored in this category. The Default canvas consist of two parts:
(1) the file name in the Settings Editor and (2) the file in the database. Selecting this data category will export the canvas files.
The server files contains the MangoClient.application file for the installation point and the predefined widgets file. If you would like to export all predefined widgets specify the filter as: WidgetSettingsDefinitions.xml.
The settings file is the default settings, the settings that are managed in the Settings Editor in Smart Office. Check include roles to include rules configured for roles and users. The filter can be set to the name of the settings file for example: Mango.UI.xml, Mango.Core.xml or Mango.* for all settings file that start with Mango. Note that the user specific settings are not included in this category. They are part of the Roamed files data category.
These are files that are shared by all users. Links in M3 and S3 are part of this category. The filter can be set to for example *M3.xml to get the M3 links.
This data category contains the following files: profile.xml, template.xml
It might also include channels.xml and users.xml from previous versions of Smart Office.
To export the profile xml enter profile.xml as filter.
Category file is specific generic table for storing files. These are the files that can be administered via the Category Files administration tool in Smart Office. The categories that are supported are: Mashup and Startpad. For the category Shared Shared files should be used and for System the System files should be used. It is not possible to add them as categories and export them here even if they are visible in the Category Files Administration tool.
The first filter field is the name of the component for example CRM* for all Mashup packages that starts with CRM. The category filter is the name for the category for example Mashup or Startpad.
Select include roles to include role mappings – for example all roles connected to Startpads and Mashups.
The roamed files contains all user files that are uploaded and downloaded to the client. For example all user settings files, Canvas, Favorites, private Startpads, excel templates and links.
To apply a filter enter the name of the file or a list of files for example Favorties.lfv,Canvas.xml in order to export all user’s favorites and canvas files. To export all files for a specific users enter a user name in the user filter. The filter is the same as all other filters it can take a list or a simple wildcard expression.
If you are using the Collaboration you can select to export the list of user’s as well as their contacts if you select to include contacts. Offline messages will not be exported so this export is for user information and the contacts each user has.
Including features will extract all features that are installed via LCM. You should select this if you move from a H2 database to another database provider. This will export all features and their application definitions. This is potentially a data category with a lot of data that you can consider exporting separately.
Note! If you are setting up a new environment and are installing all features and applications via LCM and you only what to export/import configuration this category should not be selected.
When importing data only select the content that you know is contained in the zip.
How to export data
- Make sure you have a service window
- Select configuration
- Select the data categories to include
- Specify filters
- Consider exporting roamed files separately
- Press Export to start the export
- Monitor the MangoServer log for more information as the export runs
- Download the MangoData.zip using the Download button or locate the file on disk.
- The path to the file will be part of the success message
How to import data
- Make sure you have a service window
- Select configuration
- Upload the MangoData.zip
- Use the Upload button and browse to the file –or
- Copy the file to the MangoFiles/MangoImport folder located in a location similar to this: c:\LifeCycle\server.company.com\grid\GridName\grids\GridName\applications\MangoServer\MangoFiles
- Select the data categories to import that are included in the zip
- Specify filters
- Consider importing roamed files separately
- Press Import to start the export
- Monitor the MangoServer log for more information as the import run
- Wait for a success message in the Mango Admin tool or in the log that the import has completed
Note! The Delete All button will clear the content in the database and can be used to clear an environment before importing. Use with extreme care 🙂