Moving apps between spaces
If you have an app that exists in one org/space but you need to move it to another:
- 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 runningcf push
. - If you keep the app name the same, you may need to use a different
host
to avoid route conflicts.
- Make sure to run
-
Go back to the old space.
cf target -o <OLD_ORG> -s <OLD_SPACE>
-
If you are changing orgs, remove the domain/route.
cf delete-domain <DOMAIN> # or cf delete-route <SHARED_DOMAIN> -n <HOST>
-
Go back to the new space.
cf target -o <NEW_ORG> -s <NEW_SPACE>
-
If you changed orgs and are using a Domain, re-create it.
cf create-domain <DOMAIN>
-
Map the domain/route.
cf map-route <APP_NAME> <DELEGATED_DOMAIN> # or cf map-route <APP_NAME> <SHARED_DOMAIN> -n <HOST>
-
Delete the old app.
cf target -o <OLD_ORG> -s <OLD_SPACE> cf delete <APP_NAME>