You could take a look at this posts below:
However, I will pick out points and try to summarize it below:
If you are planning to upgrade, then please consider using the long term support release (LTS), currently at version 5.0.x rather than 5.1 or 5.2 unless you need some features that are only available in them.
There is a caveat for GraphQL APIs when Migrating to 3.2 and above. Essentially, it’s best to go through our Release Notes for the particular version you have chosen.
Upgrade steps are dependent on which operating system used and how the current versions are installed. For example you may be using docker images or you may have machines dedicated to a single task.
It is recommended to at least backup your critical system and data in case unforeseen incidents arise. I would advise visiting the official documentation of each storage component to find out the best approach to backup and restore. There is a thread on something similar, so it could prove helpful.
For a guideline, I have outlined a couple of important things to note below:
- Read the release notes of the target version you desire to upgrade to and watch out for gotchas and breaking changes e.g. v3.2 and above introduces new changes to GraphQL
- Visit the documentation of your storage components to understand how to backup and restore them in isolated situations
- Prepare a backup and backout plan along with a post upgrade checklist. I have assisted with a sample at the bottom of this reply
- Backup essential components, configuration files and services for restoration in case of service failure during/after upgrade
- Follow our upgrade guidance based on your Tyk offering and sequentially upgrade each component as outlined to the target version. For open source users, stip out the closed source components.
Backup Plan (not exhaustive)
- Backup storage data - MongoDB (via mongodump or manually) and Redis (via BGSAVE )
- Backup config files (gateway, dashboard/analytics, pump, MDCB etc.)
- Backup portal assets (/opt/tyk-dashboard/) if a custom portal has been created
- Backup definition files (API and Policy) if no persistent storage (Mongo, PostgresSQL) exists
Post Upgrade Checklist (not exhaustive)
- Examine the dashboard UI and establish no functionality is broken
- Verify portal is working as expected
- Validate Gateway URL is up and running with the “hello” endpoint
- Try out the dashboard APIs
- Check APIs are accessible via the gateway
- Test current and new keys/certs. Check Redis for keys/tokens (hashed or not) and certificates
- Evaluate output of APIs with plugins
- Confirm analytics data is visible in reports
- Review pumps operation to ensure it’s purging analytics records to your desired backend
We strongly advise you to test your process on a non-critical system before attempting it on a critical one. You can create a test case on the new version with your current or pseudo data before a test upgrade.