CLI: Exports
Commands to export a space’s entries and media to a file. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
| Command | Description |
|---|---|
hakocms-cli exports create |
Start an export of a space |
hakocms-cli exports delete |
Delete an export record and its ZIP |
hakocms-cli exports download |
Download an exported ZIP |
hakocms-cli exports get |
Get one export |
hakocms-cli exports list |
List a space’s exports |
hakocms-cli exports create
Section titled “hakocms-cli exports create”Start an export of a space.
Starts an export of a space.
Returns 409 if an export of the same space is waiting or running.
hakocms-cli exports create [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--media-files[=true|false] |
Whether to include the media files themselves (included by default) |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |
--wait |
Wait until the job finishes and print the result. Exits with 1 if it fails |
hakocms-cli exports delete
Section titled “hakocms-cli exports delete”Delete an export record and its ZIP.
Deletes an export record and its ZIP. Ones that are waiting or running cannot be deleted (409)
hakocms-cli exports delete [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--force |
Do it without asking for confirmation |
hakocms-cli exports download
Section titled “hakocms-cli exports download”Download an exported ZIP.
Downloads an exported ZIP.
Returns 404 for exports that have not finished, have expired, or have been deleted.
hakocms-cli exports download [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
<ID> |
Export ID |
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
-o, --output <PATH> |
Where to write (- for standard output). If omitted, saved in the current folder with the name the server gives |
--force |
Overwrite the file if it exists |
hakocms-cli exports get
Section titled “hakocms-cli exports get”Get one export.
hakocms-cli exports get [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
hakocms-cli exports list
Section titled “hakocms-cli exports list”List a space’s exports.
Returns up to 20 items, newest first.
hakocms-cli exports list [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |