Skip to main content

BAUER GROUP Coolify migration toolkit — failsafe, resumable project and instance migration with byte-exact volume mirroring

Project description

BAUER GROUP - Coolify Migration Toolkit

PyPI Python License: MIT Tests

Today, Tomorrow, Together | Building Better Software Together

Moves a Coolify project — with its data — between servers, and relocates a whole Coolify instance to a new host. Failsafe, resumable, and rollback-capable.

Coolify can clone a resource to another server but deliberately will not move the data. VolumeCloneJob and CloneMe's cloneVolumeData flag exist upstream, but PR #4777 shipped them disabled. The maintainer's stated blockers — permission damage, job-queue spam at 50+ resources, no progress tracking, large-volume failures — are all consequences of running inside Coolify's Laravel queue. An external orchestrator has none of those constraints. That is what this is.

Repository Information

  • Version: v2.1.3
  • Repository: bauer-group/IP-CoolifyMigration
  • Branch: main
  • Architecture: Pure-logic cores with thin IO shells; saga engine with a crash-safe journal

Features

  • Application-unaware mirroring — a cleanly stopped stack makes a volume just bytes. No per-engine logic, no supported-database allowlist. Postgres, MySQL, MariaDB, MongoDB, Redis, KeyDB, Dragonfly, ClickHouse and anything else you run are all handled the same way, because none of them are special once stopped.
  • Byte-exactrsync -aHAXS --numeric-ids, parallelised, with SHA-256 and metadata verification on both sides. Never chown.
  • Failsafe — every step has a compensating action, journalled to disk. The source is never destroyed until you explicitly say so, so rollback is always available. resume reconciles against reality, not against the journal.
  • DNS gate — extracts every Traefik/Caddy hostname and refuses to start the target while DNS still resolves to the old server, with an actionable cutover checklist.
  • Honest about drift — the target is built exactly as the source is configured, but a tag is a pointer and a branch moves. We detect a floating latest that could cross a database major, or a HEAD that has moved, and put the concrete question to you rather than deciding for you.
  • Server migration — relocate the whole Coolify instance, with the APP_KEY treated as a first-class, asserted artifact rather than a lucky side effect.
  • Proven, not assumed — an integration rig of two real sshd containers asserts that uid 999, hardlinks, xattrs, sparse files and symlinks survive an actual rsync, and that a wrong chown is caught by verification.

Architecture

Layer Role
domain/ Pure logic: classification, compose analysis, volume pairing, drift, state machine
api/ Coolify REST client with per-endpoint request whitelists
discovery/ Docker + API reconciliation; the label-based quiesce gate
transfer/ asyncssh, rsync planning, checksum verification
journal/ Append-only crash-safe state
dns/ FQDN extraction, authoritative resolution, cutover gate
ui/ Rich dashboard, wizard, and a plain non-TTY fallback

Requires the instance API switched on (Settings > API — off by default) and a token with root or read:sensitive. Without the switch every call is 403 "API is disabled.", which looks like a token problem but is not. Without the scope, Coolify's ApiSensitiveData middleware silently omits value, real_value and docker_compose_raw from responses — no error, no redaction marker. The tool checks both at startup and fails closed.

Quick start

pip install bg-coolify-migrate

export COOLIFY_URL="https://coolify.example.com"
export COOLIFY_TOKEN="..."          # root or read:sensitive

coolify-migrate doctor                 # verify token scope + server reachability
coolify-migrate list                   # everything: server -> project -> env -> resource
coolify-migrate list my-project        # limited to one project

# Scope with a selector: project / project/environment / project/environment/resource
coolify-migrate plan my-project --to target-server              # whole project (dry run)
coolify-migrate run  my-project/production --to target-server   # one environment
coolify-migrate run  my-project/production/api --to target-server  # one resource

Omit the selector in a terminal and plan/run open an interactive picker.

Interrupted? coolify-migrate resume <id>. Regret it? coolify-migrate rollback <id>.

Server migration

coolify-migrate server plan --to new-host.example.com
coolify-migrate server run  --to new-host.example.com

Documentation

See docs/: installation, configuration, cli, architecture, safety, server-migration, troubleshooting.

License

MIT © BAUER GROUP

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bg_coolify_migrate-2.1.4.tar.gz (286.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bg_coolify_migrate-2.1.4-py3-none-any.whl (184.9 kB view details)

Uploaded Python 3

File details

Details for the file bg_coolify_migrate-2.1.4.tar.gz.

File metadata

  • Download URL: bg_coolify_migrate-2.1.4.tar.gz
  • Upload date:
  • Size: 286.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bg_coolify_migrate-2.1.4.tar.gz
Algorithm Hash digest
SHA256 e2b63618e09fac9c5b93fb7d9d63e719b31868349fae398241a9ff4a1e55d9a2
MD5 f9cd4f8f4a2d48aac600960a057b56aa
BLAKE2b-256 aa73316de48a95c052e8c3c78b7eea63918c075b5b65c1cb17b5d2fef6c60453

See more details on using hashes here.

File details

Details for the file bg_coolify_migrate-2.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for bg_coolify_migrate-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ba5639d649d08d8b7d798941c399c7d5104d13430add93826dafb72dd711b263
MD5 82f9cf02f8fef086fed7cb5b023f4988
BLAKE2b-256 e8c904f17fee82d480cb6db6d433c6abb3b28857771a4a8390088b558d6b8c47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page