luna import
Create lunas in an environment from an archive that luna export wrote.
luna import reads an archive that luna export wrote and creates its lunas in an environment.
luna import backup.tar.zst --env staging
Reference
luna import [OPTIONS] <ARCHIVE>
| Option | Type | Default | Does |
|---|---|---|---|
<ARCHIVE> |
path | Required | The archive to read, from luna export. |
--schedules |
flag | Off | Keeps the lunas’ schedules. Without it, they start with none. |
--dir <DIR> |
path | . |
The app’s folder. Its env file names the project and environment. |
--env <ENV> |
text | LUNA_ENV, then production |
The environment to create the lunas in. |
--project <PROJECT> |
text | LUNA_PROJECT |
The project, by name or as organisation/project. |
--tenant <TENANT> |
text | The environment’s own | A tenant added to the environment, by name. |
--token <TOKEN> |
text | LUNA_TOKEN, then your login |
An API token or account key to act with. |
Good to know
- The CLI refuses a file that does not start with
luna-export.json, and an archive in a format this version does not read. - Each luna comes back with its key, its SQLite database and its files.
- Importing needs
data:writeon the environment. - The CLI prints how many lunas it imported once it is done.
Examples
Import an export into staging
luna import production.tar.zst --env staging
Import with the lunas’ schedules
luna import production.tar.zst --env staging --schedules