-
Notifications
You must be signed in to change notification settings - Fork 31
Kubernetes cluster transver
This script exports Kubernetes resources from a source cluster, strips server-side metadata (uid, resourceVersion, etc.) using jq, adds app.kubernetes.io labels, and recreates them on a destination cluster.
Prerequisites: kubectl, jq Usage: bash copy_app.sh -a -s -d [-v] [-h] Example: bash copy_app.sh -a mef -s ctx-prod1 -d ctx-prod2
This script dumps a PostgreSQL database from a source cluster and restores it on a destination cluster. It reads DB credentials from Kubernetes configmaps and secrets.
Prerequisites: kubectl, jq Usage: bash copy_db.sh -a -s -d [-v] [-h] Example: bash copy_db.sh -a mef -s ctx-prod1 -d ctx-prod2
This script copies all non-system Elasticsearch indices from a source ECK cluster to a destination ECK cluster using kubectl exec + curl (scroll API for export, bulk API for import).
Prerequisites: kubectl, jq Usage: bash copy_es.sh -a -s -d [-j ] [-e] [-r] [-y] [-v] [-h] Example: bash copy_es.sh -a mef -s ctx-prod1 -d ctx-prod2 bash copy_es.sh -a mef -s ctx-prod1 -e # export only bash copy_es.sh -a mef -d ctx-prod2 -r # restore only
This script uses ES native snapshot/restore to migrate indices between ECK clusters. Requires a shared filesystem (NFS) mounted on both clusters. Much faster than scroll/bulk API for large datasets.
Prerequisites: kubectl, jq, shared filesystem mounted on both ES clusters Usage: bash copy_es_snapshot.sh -a -s -d -p [-y] [-v] [-h] Example: bash copy_es_snapshot.sh -a mef -s ctx-prod1 -d ctx-prod2 -p /mnt/shared/es-snapshots
This script copies snapshot repository configurations and SLM (Snapshot Lifecycle Management) policies from a source ECK cluster to a destination ECK cluster using kubectl exec + curl.
Prerequisites: kubectl, jq Usage: bash copy_es_slm.sh -a -s -d [-y] [-v] [-h] Example: bash copy_es_slm.sh -a mef -s ctx-prod1 -d ctx-prod2
—— rero.ch | Twitter | Gitter —— RERO+ catalogue | RERO ILS test version | RERO DOC | RERO MEF ——