Meza/Importing data

Importing data from another wiki can be done in several ways.

secret.yml
The following lines are required in secret.yml. See Meza/Secret config for more info.

backups_server_alt_source: addr: example.com remote_user: src-meza-ansible uploads_dir_path: /opt/data-meza/uploads/

backups_server_db_dump: addr: example.com remote_user: src-meza-ansible mysql_user: backupuser mysql_pass: "some123long456password7890"

hosts file
The following lines are required in your hosts file. See Meza/Secret config for more info.

[db-src] example.com alt_remote_user=src-meza-ansible

[backup-src] example.com alt_remote_user=src-meza-ansible

[exclude-all] example.com

Setup backup server

 * 1) Create user   on backup server. Unfortunately, with current Meza, this user has to be a passwordless sudoer.
 * 2) Create MySQL/MariaDB user   with rights SELECT, INSERT, UPDATE, LOCK TABLES, SHOW DATABASES, SHOW VIEW. If the backup server is a Meza server, this can be achieved by adding the following to the   section of  :

mysql_users: - name: "backupuser" host: "%" password: "some123long456password7890" priv: "*.*:SELECT,INSERT,UPDATE,LOCK TABLES,SHOW DATABASES,SHOW VIEW"

Run with
Running  will overwrite all wikis with their corresponding backups. This is highly destructive!

Manually position files for import
When running  Meza will try to pull data from a backup source. The simplest backup source is the one that is generated when you do. This generates the required backup directories for your existing wikis. Navigate to  to see the structure. It looks something like:

/opt/data-meza/backups/ demo 20180414122334_wiki.sql 20180413122334_wiki.sql 20180412122334_wiki.sql uploads/ anotherwiki ...   anotherwiki2 ...

If you run  then delete these SQL files, upload your own SQL file, and replace the   directory with your desired uploads, running   will import that data into the wiki. Note that all wikis will be overwritten with whatever they have as backups, so be careful how you use this!