What is difference between Restage and Restart your application in Pivotal Cloud Foundary and when to pick one among this?
NAME. restage - Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.). This action will cause app downtime.
A droplet is the result of the application staging process. Managed Services. Services provided by third parties that are integrated into Cloud Foundry through APIs so that Cloud Foundry users can provision reserved resources and credentials on demand.
cf start - starts a stopped application.
The quotes below are from the 2.0 documentation.
Restarting your application stops your application and restarts it with the already compiled droplet.
So if you haven't made any changes and don't need to re-compile the project, a Restart
should be done.
Restaging your application stops your application and restages it, by compiling a new droplet and starting it.
Restaging your app compiles a new droplet from your app without updating your app source. If you must update your app source, re-push your app.
The difference between the two is that Restart
won't re-compile the project while Restage
does.
In addition to the above answer, to know when to restart and restage please find below the explanation from the Docs.
When to Restart:
Restart your app to refresh the app’s environment after actions such as binding a new service to the app or setting an environment variable that only the app consumes.
When to Restage:
Restage your app if you have changed the environment in a way that affects your staging process, such as setting an environment variable that the buildpack consumes. The staging process has access to environment variables, so the environment can affect the contents of the droplet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With