{"id":17348149,"url":"https://github.com/heavybullets8/tt-migration","last_synced_at":"2025-02-26T02:31:34.603Z","repository":{"id":153086786,"uuid":"628017871","full_name":"Heavybullets8/TT-Migration","owner":"Heavybullets8","description":"PVC Migration script for Truenas SCALE","archived":true,"fork":false,"pushed_at":"2024-05-23T11:47:07.000Z","size":157,"stargazers_count":53,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T08:39:19.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Heavybullets8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-14T18:02:56.000Z","updated_at":"2024-11-13T04:29:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"196424b1-1161-45eb-92a5-e095c04bddd1","html_url":"https://github.com/Heavybullets8/TT-Migration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heavybullets8%2FTT-Migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heavybullets8%2FTT-Migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heavybullets8%2FTT-Migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heavybullets8%2FTT-Migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Heavybullets8","download_url":"https://codeload.github.com/Heavybullets8/TT-Migration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240780694,"owners_count":19856406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T16:51:14.295Z","updated_at":"2025-02-26T02:31:34.322Z","avatar_url":"https://github.com/Heavybullets8.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Migration Script for TrueNAS SCALE\nThis 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. \n\n\u003cbr\u003e\n\n## Usage\n\n```bash\nbash migration.sh\n```\n\n\u003cbr\u003e\n\n### Options\n\n\n| Option            | Short Form | Description                                                  |\n|-------------------|------------|--------------------------------------------------------------|\n| `--skip`          | `-s`       | Continue with a previously started migration.                |\n| `--no-update`     | `-n`       | Do not check for script updates.                             |\n| `--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.  |\n| `--latest-version`| `-l`       | Migrate to the latest version of the software. Note: using this option means you will not be supported. |\n| `--rename`        | `-r`       | Prompt to rename the application.                                      |\n\n#### Important Notes\n\n- 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.\n\n---\n\n\u003cbr\u003e\n\n## Failures\n\n\u003e Make sure to retry with the `--skip` option\n\nFailed applications will be added to this list if any are confirmed. \n\n| Application        |\n|--------------------|\n\n---\n\n\u003cbr\u003e\n\n## Guide\n\n### Run The Script\n\n![Run Script](https://github.com/Heavybullets8/TT-Migration/assets/20793231/94e382fe-208f-4a00-a384-f0572b28ad25)\n\n\u003cbr\u003e\n\n### Finding App Dataset\n\n![Find Dataset](https://github.com/Heavybullets8/TT-Migration/assets/20793231/70a05b36-8b14-4e03-a4f2-dc9e97872aa2)\n\n\u003cdetails\u003e\n\u003csummary\u003eApp Dataset Not Found?\u003c/summary\u003e\n\nMake sure you have a pool selected at: `TrueNAS GUI \u003e Apps`.\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n### System Train Check\n\n![System Train](https://github.com/Heavybullets8/TT-Migration/assets/20793231/d36d3cf2-16f0-4162-bdc8-c949579b3e53)\n\n\u003cdetails\u003e\n\u003csummary\u003eApplication is on the system train?\u003c/summary\u003e\n\n![image](https://github.com/Heavybullets8/TT-Migration/assets/20793231/745cfa60-4d79-44b8-ab04-dcdea8165e3d)\n\n\nUnless specifically told to, you should not migrate these applications, but you can if you use the `--force` flag.\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n### Database Check\n\n\u003e Only used to check for CNPG databases\n\n![Database Check](https://github.com/Heavybullets8/TT-Migration/assets/20793231/371a7e27-69a0-4aa8-9139-b8ed6756d079)\n\n\u003cdetails\u003e\n\u003csummary\u003eDatabase Found?\u003c/summary\u003e\n\n\u003cbr\u003e\n\n**Prompt to Attempt Restore**\n\n![Prompt Restore](https://github.com/Heavybullets8/TT-Migration/assets/20793231/c15ec76c-1164-4713-9bc9-04d01a598ead)\n\nThis 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.\n\n\u003cbr\u003e\n\n**Prompt to Provide Your Own Database**\n\n![Provide DB](https://github.com/Heavybullets8/TT-Migration/assets/20793231/57e1dc5e-a543-4a26-9505-3dd655218ceb)\n\nIf you chose yes for the first prompt, you will then be prompted to choose to use the automatic restore or provide your own restore.\n\n\u003cbr\u003e\n\n- If you choose yes, the script will exit and ask that you copy a file to the specified directory.\n  \n  ![Exit Script](https://github.com/Heavybullets8/TT-Migration/assets/20793231/18fd4bcb-e70b-4ff4-8975-f660f605f797)\n\n\u003cbr\u003e\n\n- If you choose no, the script will create a new dump.\n\n  ![Create Dump](https://github.com/Heavybullets8/TT-Migration/assets/20793231/30b5441c-a427-47ff-bd6b-206a2c31fa23)\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n### Creating App Dataset\n\n![Create Dataset](https://github.com/Heavybullets8/TT-Migration/assets/20793231/f4a93a0c-8d9d-416b-880b-9b9d96abd6e9)\n\nThis created a dataset that will be used throughout the migration for backup information.\n\n\u003cbr\u003e\n\n### Renaming the App's PVCs\n\n![Rename PVCs](https://github.com/Heavybullets8/TT-Migration/assets/20793231/bfe4b241-c1c0-4232-9ceb-f79ba5caf0ec)\n\nThis moves the original applications PVCs to the backup directory.\n\n\u003cbr\u003e\n\n### Deleting the Original App\n\n![Delete App](https://github.com/Heavybullets8/TT-Migration/assets/20793231/3e404112-88ce-40fb-9575-ffe72345bb63)\n\n\u003cdetails\u003e\n\u003csummary\u003eFailure?\u003c/summary\u003e\n\nOccasionally 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.\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n### Renaming The Application\n\n![Rename App](https://github.com/Heavybullets8/TT-Migration/assets/20793231/d96bc17d-be60-4565-b5a4-51e8a69e7253)\n\nIf you choose to, you can rename the new application differently from the original.\n\n\u003cbr\u003e\n\n### Creating the Application\n\n![Create App](https://github.com/Heavybullets8/TT-Migration/assets/20793231/adf4e709-5282-46f4-8ac0-886b6ff24d74)\n\n\nThis creates the application with all the same settings from the original install.\n\n\u003cbr\u003e\n\n### Destroying the New App's PVCs\n\n![Destroy PVCs](https://github.com/Heavybullets8/TT-Migration/assets/20793231/43227621-0fae-4c4d-b9b2-1f6424c992c9)\n\nThis will destroy the new applications PVCs so that they can be replaced by the original.\n\n\u003cbr\u003e\n\n### Renaming the Migration PVCs to the New App's PVC Names\n\n![Rename Migration PVCs](https://github.com/Heavybullets8/TT-Migration/assets/20793231/f7d5d80d-ca1e-4068-9410-3929c04b134a)\n\nThis matches the applications PVCs, then renames and moves the originals.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavybullets8%2Ftt-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheavybullets8%2Ftt-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavybullets8%2Ftt-migration/lists"}