prompts / vps-handover.md
edit FILL IN & copy this prompt →868 words

Prompt: hand a server, volume or snapshot over to another ird account

Have an agent prepare an ird server (or volume, or snapshot image) for handover to another account — secrets rotated, your keys removed, a snapshot in hand — walk you through the offer in the ird panel, watch the transfer until it is accepted, and verify what changed on both sides. Works in reverse for receiving one.

Needs: ird access (MCP server or the ird CLI, logged in); the ird web panel (ird docs opens it) — offers are made and accepted there, not through the CLI or MCP; SSH access to the server for the pre-handover work Costs: the pre-handover snapshot per GB-hour while you keep it (credits_prices → recurring.image-hourly); the resource itself keeps billing its tier or GB-hour (recurring.vps-hourly, recurring.volume-hourly) to whichever account the panel says is the payer at each stage Group: servers

Paste everything below the line into a fresh conversation. Fill in the FILL IN block first.


Task

DIRECTION the resource below: preparation checklist, exact panel steps for me, then verification. Nothing is offered, accepted or destroyed by you — those are my clicks.

FILL IN

DIRECTION:   give                 # give | receive
RESOURCE:    server               # server | volume | image
NAME:        app-1                # name or id (vps_list, `ird vps volumes`, `ird vps snapshot images`)
HOST:        app.example.ro       # hostname currently pointing at the server, or blank
ZONE:        example.ro           # its zone on ird DNS (yours), or blank
COUNTERPART: the other account's ird login/email as they gave it to me
SECRETS:     Postgres password, app API key, .env   # what must be rotated or removed before handover

Non-negotiable rules

  1. Read-only transfer tools. vps_transfers_list (CLI: ird vps transfers) only lists pending incoming/outgoing offers — offering and accepting happen in the web panel; no CLI or MCP command offers, accepts or cancels. Relay the panel's own wording on billing and DNS to me before I click — documented nowhere else.
  2. Snapshot before giving. ird vps snapshot NAME pre-handover and wait until ird vps snapshot images shows it available — that snapshot stays mine after the server is gone.
  3. Nothing of mine stays on the box. SSH keys, API keys, tokens, .env values listed in SECRETS are rotated or removed before the offer; the recipient gets fresh ones through their own channel, never chat.
  4. No destroy, no DNS deletion, no acceptance by me. vps_destroy and dns_delete_record are off the table in this prompt; the recipient decides what to do with a received resource.
  5. Poll gently. vps_transfers_list at most once a minute while waiting for the counterpart.

Steps — give

A. Inventory. vps_list → id, tier, ipv4, state (CLI: ird vps show NAME); ird vps snapshot images and ird vps volumes for anything tied to it (instance_id). dns_get_zone(ZONE) → records at HOST. vps_transfers_list: no outgoing offer for it yet.

B. Snapshot per rule 2; record image id and monthly cost.

C. Scrub. Over SSH: rotate every item in SECRETS; remove my public keys from every authorized_keys; remove my users and sudo rights, leaving one account with a key the recipient gave me; clear shell histories and CLI credentials in home directories; journalctl --vacuum-time=1d if logs carry secrets. Record what was rotated, not the values.

D. DNS. HOST is a record in my zone and stays mine — the transfer moves the server, not the domain. Either COUNTERPART points their own hostname at ipv4 and I remove mine after they confirm (dns_delete_record only on my say), or I keep serving HOST for them (the delegated-domain-management prompt, not this one).

E. Offer. ird docs opens the panel; I start the transfer to COUNTERPART there. Before confirming, I paste the panel's text on billing (who pays from when) and the anchor into chat; you restate it. Then vps_transfers_list → the offer under outgoing.

F. Wait and verify. Poll per rule 5 until it leaves outgoing. Then: vps_list no longer lists the id (delegated=true means grant-shared, not transferred — still listed = not moved); ird vps activity for a related entry (no transfer job type is documented — report what appears); ird credits ledger --limit 50 --kind charge shows no further hourly charge for it after the acceptance time. Keep the snapshot until COUNTERPART confirms the server works, then ird vps snapshot images delete <image-id> on my say.

Steps — receive

G. Check before accepting. vps_transfers_list → the offer under incoming: resource type, name, size/tier. vps_tiers and credits_prices → monthly cost to me; credits_balance must cover a month. State it, then I accept in the panel.

H. Take ownership. vps_list shows it; ssh in with the key the giver installed; add my own key (ird vps ssh-keys add for future rebuilds), remove theirs, rotate everything in SECRETS again — the giver still knows the old values. ird vps snapshot NAME received-<date> once it's mine. Point my hostname at ipv4 with dns_set_record(domain=ZONE, name="HOST.", type="A", data={address: ipv4}).

Deliverable

The resource id, snapshot id kept (with monthly cost), the scrub log (what was rotated/removed, no values), the panel's billing/DNS wording as relayed, the transfer's final state from vps_transfers_list, the post-transfer vps_list/ledger check, and the DNS records changed.

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/prompts.git