Rancher PolyMorph is a CLI (rancher-polymorph) for sanitizing Rancher backup tarballs and migrating Rancher to a new management cluster (backup → sanitize → restore).
📖 Documentation: docs/ · https://aeltai.github.io/Rancher-PolyMorph/
- sanitize — filter full backups to one cluster (or all RKE1); strip local cluster, Fleet ghosts, orphans
- inspect — read-only backup analysis;
--treepreviews keep/drop layout - ui — interactive wizard: S3 pull, sanitize, full migration (source → sanitize → restore), restore watch
- s3 — pull/push backup tarballs
- restore — copy tarball to operator pod, apply Restore CR via kubeconfig
- config — defaults in
rancher-polymorph.yaml
git clone https://github.com/aeltai/Rancher-PolyMorph.git
cd Rancher-PolyMorph
make build
./bin/rancher-polymorph config init
./bin/rancher-polymorph ui
# Or non-interactive (Bosch — keep all RKE1 clusters):
./bin/rancher-polymorph inspect -i ./backups/source-full.tar.gz --tree
./bin/rancher-polymorph sanitize \
-i ./backups/source-full.tar.gz \
-o ./backups/sanitized-rke1-only.tar.gz \
--keep-rke1-only \
--report ./backups/report.txt- Full backup on source Rancher
rancher-polymorph sanitize --keep-rke1-only(Bosch) or--keep-cluster(single cluster)rancher-polymorph restore runon a clean target (kubeconfig in config)- Install Rancher Helm after restore completes
- Reconnect downstream RKE1 agents (
scripts/reconnect-rke1-agents.sh)
See the migration guide and sanitize reference.
rancher-polymorph config init # ~/.config/rancher-polymorph/rancher-polymorph.yamlSee config.example.yaml and configuration docs.
make build
make test
make test-cover
make lint
make docs-serve # local docs at http://127.0.0.1:8000Never commit backup tarballs, sanitize logs, kubeconfigs, or credentials. The .gitignore blocks common patterns; keep production backups local only.
Apache-2.0 — see LICENSE.