Cleaning an Instance
Cleaning an Instance is possible on staging environments only.
This guide will help you use the
pos-cli to clean data on your Instance.
This is an advanced tutorial. To follow it, you should be familiar with basic platformOS concepts, the Get Started section, and have
- Deleting data stored in the database using
pos-cli data cleanis irreversible. Caution is advised.
pos-cliwill ask you for confirmation, so you don't delete data by accident.
- This operation is asynchronous, which means it may take several seconds before it is completed and visible in the browser.
Cleaning only records and users
To clear only data stored in records and users, use the
pos-cli data clean command:
$ pos-cli data clean ENVIRONMENT
$ pos-cli data clean staging [22:37:35] [22:37:35] WARNING!!! You are going to REMOVE your data from instance: https://pawel-examples.staging.oregon.platform-os.com/ [22:37:35] There is no coming back. [22:37:35] ✔ If you still want to continue please type: 'CLEAN DATA' … CLEAN DATA [22:37:41] Going to clean data [22:37:43] Instance data scheduled to be clean.
Cleaning all the data from database
-i) to the command, you can additionally remove all admin resources, pages, schemas, graphql queries, notifications.
It will not clear Instance constants (found in
context.constants) or anything set up in the Partner Portal (test_emails, integration keys).
$ pos-cli data clean ENVIRONMENT --include-schema
$ pos-cli data clean staging --include-schema [22:39:14] [22:39:14] WARNING!!! You are going to REMOVE your data and database schemas from instance: https://pawel-examples.staging.oregon.platform-os.com/ [22:39:14] There is no coming back. [22:39:14] ✔ If you still want to continue please type: 'CLEAN DATA' … CLEAN DATA [22:39:17] Going to clean data [22:39:19] Instance data scheduled to be clean.