This script is designed to migrate most applications on TrueNAS SCALE. Occasionally, breaking changes occur which make updates impossible. This script may help overcome such issues by facilitating safe and effective migration of applications. Works with PVC's, CNPG Databases, both, or neither.
bash migration.sh
Option | Short Form | Description |
---|---|---|
--skip |
-s |
Continue with a previously started migration. |
--no-update |
-n |
Do not check for script updates. |
--force |
Force migration without performing health checks, using this voids support and most of the time results in an error later on in the script, do not use this unless instructed to. | |
--latest-version |
-l |
Migrate to the latest version of the software. Note: using this option means you will not be supported. |
--rename |
-r |
Prompt to rename the application. |
- Usage of
--latest-version
or--force
flags might impact your eligibility for support. Any use of these flags will result in you not being supported. Please use these options with caution.
Make sure to retry with the
--skip
option
Failed applications will be added to this list if any are confirmed.
Application |
---|
App Dataset Not Found?
Make sure you have a pool selected at: TrueNAS GUI > Apps
.
Application is on the system train?
Unless specifically told to, you should not migrate these applications, but you can if you use the --force
flag.
Only used to check for CNPG databases
Database Found?
Prompt to Attempt Restore
This means a CNPG database was found, and the script can attempt to backup and restore the database, but there is no guarantee that it will work. The script has been very solid in my experience when it comes to handling databases.
Prompt to Provide Your Own Database
If you chose yes for the first prompt, you will then be prompted to choose to use the automatic restore or provide your own restore.
This created a dataset that will be used throughout the migration for backup information.
This moves the original applications PVCs to the backup directory.
Failure?
Occasionally failures can happen, the script will attempt to work through them, but if the script exits here, you will need to delete the application manually prior to continuing. This includes deleting any PVs and datasets for the application that are NOT under the migration dataset.
If you choose to, you can rename the new application differently from the original.
This creates the application with all the same settings from the original install.
This will destroy the new applications PVCs so that they can be replaced by the original.
This matches the applications PVCs, then renames and moves the originals.