Start for free
Back to updates

Cloudpepper Update

Refresh staging instances from production

You can now refresh a staging instance with a fresh copy of production. Open the staging instance in your dashboard and click Refresh.

Until now, you could bring current production data into a staging instance only by restoring a production backup into it, or by creating a new staging instance. The Refresh action copies production directly into the existing staging instance. The staging domain stays the same.

What happens during a refresh

  • Cloudpepper stops the staging instance and replaces its database and filestore with a copy of production.
  • The custom modules installed on production are copied to the staging instance, so the code matches the data.
  • The Odoo configuration of the staging instance is replaced with a copy of the production configuration, adjusted for staging.
  • The database is neutralized, as with any staging copy: outgoing mail servers are disabled, scheduled actions are disabled apart from Odoo’s own maintenance jobs, and mail is routed to the staging mail catcher. See Restore backups with a neutralized database.
  • The Odoo base URL is set to the staging domain.
  • The staging instance is started again.

Before the copy starts, Cloudpepper checks that the server has enough free disk space for a copy of production. If it does not, the refresh is cancelled before any data is changed, and a notification in the dashboard explains why.

The staging instance is unavailable while the refresh runs. This may take several minutes, depending on the size of the production database. Data, code and configuration that existed only on the staging instance are lost. The dashboard asks for confirmation before the refresh starts.

Requirements

  • Write access on the staging instance and view access on its production instance.
  • Staging and production on the same server.

API

The refresh is also available through the API: POST /instances/{id}/refresh, where id is the staging instance. See the API reference for details.