Automated IT Glue to Hudu Migration Script
A few weeks after we had completed our move to Hudu by performing a manual migration, I finally figured out how you could do an automated migration. So after 5 weekends of work, many evenings, well over 100 hours, a ridiculous amount of restored snapshots and one very supportive and understanding partner 🙂 . Here is a script which should make your life easier when migrating.
What can it migrate:
- Flexible Asset Layouts
- Flexible Assets
- Documents with folder structure
- Document Links
What are the limitations:
All layout fields will be marked as non-required – To handle rewriting tags between assets, the script has to first create a holding item for each Asset Layout and Asset. To do this I use a new “Migrated from IT Glue” field and set the date of the migration there in each layout and asset on the first creation. Once the migration completes you can edit the layout to remove this field. You will also need to go through each Layout and manually set every field that needs to be required.
Everyone’s environment is going to be unique – I have only been able to test on a few environments so there may be issues you run into. If you run into problems feel free to reach out on https://www.reddit.com/r/hudu or in the MSP Geek Slack #v-hudu channel and I will do my best to help.
IT Glue does not give API access to Documents – To workaround this, this script needs to upload them from a full export of your tenant. The documents uploaded are then limited by how IT Glue rendered them to HTML in this export. Everything else will be migrated via the IT Glue API.
IT Glue and Hudu give no API access to Checklists / Processes – These will need to be manually migrated
Matching Existing Items – This script tries to match on existing items first that are already in Hudu, for example Companies, Locations, Contacts and Configurations. There is no guarantee this will work, so you may end up with duplicates.
Other Tag Field Types and Item relations – At present Hudu doesn’t have a mechanism for tagging certain items in an Asset through the API. For example companies passwords etc or related items on the right bar. An HTML report is generated at the end with details on what you need to do manually.
A full backup of your Hudu system before you start the import. Things could go wrong so make sure you can get back to a state from before you run the tool.
This is an interactive script and must be run from a machine that is encrypted. The script saves progress to JSON files which are dumps of everything migrated so make sure the machine it is run on is secure and encrypted.
An IT Glue API Key with password access enabled.
Your IT Glue API URL.
A full export of your IT Glue tenant.
An instance of Hudu installed. Ideally with your PSA and RMM integrations setup so Companies, Contacts and Devices will already have synchronised across.
A Hudu API Key with password access enabled.
Your Hudu Base Domain
A full backup of your Hudu system before you start the import. Things could go wrong so make sure you can get back to a state from before you run the tool. (Yes I put this twice).
At some point during the script you are likely to trigger Hudu rate limiting. Just leave the script running when this happens and it will keep retrying automatically.
At present importing Global KB articles is slow as each one has to download every folder in Hudu and parse them to get the global KB folder structure. Hudu are going to add a filter which will speed this up shortly.
It is an interactive script which will ask you questions as it goes through so please keep an eye on it.
If you only want to migrate certain things there are script settings which will allow you to turn sections on and off. The script will still try to match against the existing items in Hudu for tag matching, but will not migrate new items across for the disabled sections.
The script will create a MigrationLogs folder the location the script is run from. In here it will keep a copy of the new Hudu items and the old IT Glue items stored as json. If anything goes wrong you can use these files to track down the problem and undo anything if required.
Rollback / Resume
At various points the script will prompt you to take a snapshot. If you are able to I would recommend taking a VM snapshot. If something goes wrong you can then revert to the snapshot and remove the .json file(s) that correspond to the items you imported after the snapshot from the MigrationLogs folder. You can then restart the script and it will carry on from the point of the snapshot, by loading the *.json files in the MigrationLogs folder.
If you are on a cloud version or can’t take snapshots and something goes very wrong. Please make sure you keep the contents of MigrationLogs and reach out to me and I will be able to provide an undo script (hopefully, with no guarantees).
- Have a base Hudu install with your integrations setup to sync in things like companies and contacts from your PSA and configurations from your RMM. Don’t setup any Layouts other than for synchronised assets from integrations.
- Perform a clean up of you IT Glue environment. Make sure you have cleaned up any duplicate records. Removed any old ones you don’t want to migrate.
- Check your Flexible Layouts don’t have any fields named the same thing on the same layout. For example we had two fields called Pre-Shared Key on our Wireless asset. (One for primary one for guest). If this is the case rename one of them.
- In IT Glue perform a full export and wait for that to complete and download the zip file.
- Extract that ZIP to C:\temp or equivalent.
- Obtain an API Key with password access from IT Glue
- Obtain an API Key with password access for Hudu.
- Read through the settings section of the script and configure it as needed.
- Double check your backups of Hudu
- Run the script and answer questions as the script runs.
The settings in the script all have instructions on what they are for. If you choose to disable importing of any items they will just be matched against what is already in Hudu.
Get the latest version on Github here: https://github.com/lwhitelock/ITGlue-Hudu-Migration/blob/main/ITGlue-Hudu-Migration.ps1