Copying an App
To copy an existing app you can use the copy application
command. This creates
a new app with the same configuration as your existing app with some minor
exceptions that are explained below. In this example, the existing app named
go-example
in the currently active project is copied to a new app named
go-example-v2
.
nctl copy application go-example --target-name=go-example-v2
To copy an app to a different project, you can use the --target-project
flag.
nctl copy application go-example --target-name=go-example-v2 --target-project=nine-project2
By default the copied app will be in paused state so you can review it and make
adjustments before starting it. To override this behaviour you can pass the
--start
flag to the copy command to immediately start the copied app.
Similarly, the copy won't include the custom hosts by default. To override this
behaviour you can pass the --copy-hosts
flag to the copy command to also copy
over all hosts of the existing app. When copying hosts, they will need to be
verified again and the hosts
need to be removed from the old app, in case it still exists, before they become
active on the new app.