Skip to content

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.

To create a new wiki from a database dump, use the --database flag with 'canasta create' or 'canasta add' instead.

canasta import [flags]

Examples

  # Import a SQL dump into a wiki
  canasta import -i myinstance -w main -d /path/to/dump.sql

  # Import a gzipped dump and replace the wiki's Settings.php
  canasta import -i myinstance -w main -d /path/to/dump.sql.gz -l /path/to/Settings.php

Options

Flag Shorthand Description Default
--database -d Path to SQL dump file (.sql or .sql.gz)
--help -h help for import
--id -i Canasta instance ID
--wiki -w ID of the wiki to import into
--wiki-settings -l Path to per-wiki Settings.php to replace the existing one

Options inherited from parent commands

Flag Shorthand Description Default
--verbose -v Verbose output

SEE ALSO

  • canasta - A CLI tool for Canasta installations.