Development

Canasta: Using Canasta > Other maintenance

The following are some of the other options available for configuring and maintaining a Canasta wiki or wiki farm.

Table of contents

Configuration

Canasta relies on setting environment variables in the Docker container for controlling aspects of the system that are outside the purview of LocalSettings.php. You can change these options by editing the .env file; see .env.example for details:

You can add/modify extensions and skins using the following mount points:

Running maintenance scripts

MediaWiki contains over 200 maintenance scripts in its maintenance\ directory; you can see the full list here. These scripts cover everything from actions like changing users' passwords and importing a batch of images, to much more obscure tasks like testing the MediaWiki parser.

There is a reasonable chance that you will never need to run a maintenance script while using Canasta. The most important maintenance script is update.php, but it is run during the container startup process, so if you need to run it, you can always get it to run simply by calling the canasta restart command. As for runJobs.php, another popular maintenance script, the job queue is always automatically run during the entire life of the container.

However, in case you do want to run a MediaWiki maintenance script, you can call the following:

sudo canasta maintenance "SCRIPT_NAME.php"

The quotation marks are there so that you can pass in flags to the script, and not have the canasta maintenance command think that these are its own flags. For instance, to create a new "WikiSysop" administrator account, with password "VerySecurePassw0rd", you could call the following:

sudo canasta maintenance "createAndPromote.php WikiSysop VerySecurePassw0rd --bureaucrat --sysop"

Using restic

restic is a very useful utility for doing automated backups to a variety of different storage types; though Canasta's usage of restic is configured for using AWS S3-based repositories.

Canasta makes use of restic's dockerized binary.

How to get started

  1. Add these environment variables to your Canasta installation's .env file. Follow the steps at cli-configure-quickstart to obtain ACCESS_KEY_ID and SECRET_ACESS_KEY.
    AWS_S3_API=s3.amazonaws.com
    AWS_ACCESS_KEY_ID=
    AWS_SECRET_ACCESS_KEY=
    AWS_S3_BUCKET=
    RESTIC_PASSWORD=
  2. When using restic for the first time in a Canasta installation, run the following command to initialize a restic repo in the AWS S3 bucket specified in the .env file:
    sudo canata restic init -i canastaId

    Now you should be able to use any of the available commands.

Available restic commands

  check         Check restic snapshots
  diff          Show difference between two snapshots
  forget        Forget restic snapshots
  init          Initialize a restic repo
  list          List files in a snapshost
  restore       Restore restic snapshot
  take-snapshot Take restic snapshots
  unlock        Remove locks other processes created
  view          View restic snapshots

Use "sudo canasta restic [command] --help" for more information about a command.

/etc/canasta/conf.json

Uninstall CLI