cb-cli export - Brings a ClearBlade platform System to the local development environment
cb-cli export [-exportrows] [-exportusers]
Once you have run the init command, one next step is to cd into the newly created repo and run cb-cli export (or cb-cli pull – see below). This will “download” all useful clearblade objects into the repo – it completely populates the repo/directory structure shown above. The options specific to the export command are:
The full url of the ClearBlade platform eg: https://platform.clearblade.com
The system key for the system being brought local
The messaging url for the system being brought local
The email address of the developer working on the system (you)
Clears all directories prior to performing the export.
This not only exports the collection objects, but also export all “rows” (or items) in each collection. Be very careful when using this option as it may be unfeasable to export very large collections.
This exports the data (minus passwords) from the system’s users table. If not present on the command line, only the users table schema is exported.
When exporting data collections, this option indicates that the item_id column should also be exported with each row.
This option, when specified, will sort the rows of an exported data collection by item_id. This is useful when using a version control system and you wish to view the differences between two versions of a data collection.
When exporting the rows of a data collection and there are a large number of rows (> 100k), it is adviseable to increase the number of rows constituting a page. This will improve the performance of the export by decreasing the number of queries against the database.
You can shortcut the cb-cli init/cb-cli export steps by just calling cb-cli export outside of a repo. This will do a combination of init and export. You can either provide the init options on the command line or you will be prompted for them. This is a common way to begin working on a system locally.
cb-cli export -exportrows -exportusers