canasta import
canasta > import
canasta import
Import a database into an existing wiki
Synopsis
Import a database dump into an existing wiki, replacing its current database. The instance must be running. Supported formats are .sql and .sql.gz files.
The extra databases the wiki declares (see canasta backup databases) are imported too, each from the dump canasta export writes beside the main one: <stem>.<database>.sql or .sql.gz, where <stem> is the main dump's path without its .sql/.sql.gz extension. An extra database with no such dump is left as it is, and reported.
After the import, update.php runs for the wiki so an older dump's schema matches the installed MediaWiki and extensions. Pass --skip-update to leave the schema as the dump has it.
To create a new wiki from a database dump, use the --database flag with canasta create or canasta add instead.
canasta import [flags]
Examples
canasta import -w main -d dump.sql
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--database |
-d |
Path on the controller (the machine running canasta) to a SQL dump file (.sql or .sql.gz) | ✓ | Both | |
--wiki |
-w |
ID of the wiki to import into | ✓ | Both | |
--id |
-i |
Canasta instance ID | * | Both | |
--skip-update |
Skip running update.php after importing | Both | |||
--wiki-settings |
-l |
Path on the controller (the machine running canasta) to a per-wiki Settings.php to replace the current one | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |