Reference · the tools · environments
clone_environment
Clone an environment
What it does
Copy-on-write clone of an existing environment, INCLUDING its database contents and installed dependencies. The copy starts with everything the original had and then diverges. Use this to try a change on a branch without disturbing the original. Takes a couple of seconds regardless of how large the environment is. (formerly clone_bundle)
What it needs to know
- environment_id
- The environment to copy, as shown by environment_status.
- name
- What to call the copy, from the user. Becomes its hostname, so lowercase letters, digits and hyphens only. Ask rather than generating one.
- holder
- What your session calls itself; the copy is claimed for you.
- confirm · optional
- Go ahead although the box or its pool is above 75% memory (a box nearly out of memory is refused regardless) -- only after telling the user and asking.
- box · optional
- Which box: its name and account, "home.frank" or "jordan.northwind", or just "home" when only one of your boxes is called that. Omit it for your current box (switch_box changes it; list_boxes says which it is).
- session_box · optional
- The box this session runs on, if it runs on one of yours: its name, as the on-box instructions give it ("frankh90.hemlane"). With it, a call that names no box is checked against your current box.
Where it lands
On one of your boxes: the one named in box, or your default box when none is named.