Skip to main content
undefined
undefined

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

undefined

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Moving apps between spaces

If you have an app that exists in one org/space but you need to move it to another:

  1. Deploy the new application instance using the appropriate steps on the cloning page.

    • Make sure to run cf target -o <NEW_ORG> -s <NEW_SPACE>  before running cf push .
    • If you keep the app name the same, you may need to use a different host  to avoid route conflicts.
  2. Go back to the old space.

    cf target -o <OLD_ORG> -s <OLD_SPACE>
  3. If you are changing orgs, remove the domain/route.

    cf delete-domain <DOMAIN>
    # or
    cf delete-route <SHARED_DOMAIN> -n <HOST>
  4. Go back to the new space.

    cf target -o <NEW_ORG> -s <NEW_SPACE>
  5. If you changed orgs and are using a Domain, re-create it.

    cf create-domain <DOMAIN>
  6. Map the domain/route.

    cf map-route <APP_NAME> <DELEGATED_DOMAIN>
    # or
    cf map-route <APP_NAME> <SHARED_DOMAIN> -n <HOST>
  7. Delete the old app.

    cf target -o <OLD_ORG> -s <OLD_SPACE>
    cf delete <APP_NAME>