Create a new Koha instance.
koha-create [--create-db|--request-db|--populate-db] \ [--marcflavor marc21|normarc|unimarc] \ [--zebralang en|nb|fr] \ [--defaultsql /path/to/some.sql] \ [--configfile /path/to/config] [--adminuser n] instancename
Simple example, with MySQL running on the same server as everything else:
sudo koha-create --create-db instancename
Order of precedence for config options, from lowest to highest:
The defaults set in koha-create itself
/etc/koha/koha-sites.conf
Config file specified with --configfile
Individual options set with --marcflavor, --zebralang, --defaultsql, --adminuser
See Koha 3.2 on Debian Squeeze for further details.
Disable a Koha instance.
koha-disable instancename
Enable a Koha instance. New instances are enabled by default. You only need this command if you have previously disabled a site with koha-disable.
koha-enable instancename
Restore a Koha site from a dump (from koha-dump).
koha-restore sqldump configdump
Dump all contents and configs for a Koha site right now.
koha-dump instancename
Performs backups of the koha installations on the system
This allows automation of backing up the koha data and configuration to the filesystem. It will keep the past so many backups, discarding older ones.
Options:
--output: the directory that the resulting files will be placed into. (default: /var/spool/koha) --days: the number of days to keep backups around for (default: 2)
Note: backups produced using this tool can be restored using \`koha-restore'.
Remove a Koha instance.
koha-remove instance1 instance2 etc
Start Zebra for named Koha instances.
koha-start-zebra instance1 instance2 etc
Restart Zebra for named Koha instances.
koha-restart-zebra instance1 instance2 etc
Rebuild the Zebra database for a Koha instance.
koha-rebuild-zebra [-u|--usmarc] [-f|--full] [-...] instance1 instance2 etc
-u: runs the process as USMARC rather than the default of MARCXML
-f: does a reindex of the whole collection
-...: anything else is passed directly to rebuild_zebra. This is useful in particular for -v.
koha-rebuild-zebra currently only has the ability to do both bibs and authorities at the same time - you cannot do authorities alone.
As an example, a full, verbose reindex for one instance would look like this:
sudo koha-rebuild-zebra -f -v instancename
Stop Zebra for named Koha instances.
koha-stop-zebra instance1 instance2 etc
Turn on the email for a Koha instance.
koha-email-enable instance1 instance2 etc
Turn off the email for a Koha instance.
koha-email-disable instance1 instance2 etc
Create default contents from an existing Koha site.
koha-dump-defaults instancename
Upgrade the DB schema for Koha instances. Done automatically on package upgrades.
koha-upgrade-schema instance1 instance2 etc
Reset password for a user in a Koha instance.
koha-reset-passwd instancename username
Provide an interactive mysql shell set up for the specified koha instance.
koha-mysql instancename
To send some SQL to MySQL and get an answer back, without going into an interactive session (similar to the -e option to the mysql command):
echo "some sql" | koha-mysql instancename
(This command is new in Koha 3.6.)
Performs the necessary changes to upgrade a Koha system from 3.2 to 3.4.
koha-upgrade-to-3.4 [instance1] [instance2] [...]
If no instance names are provided, this will run it on all of them.
These are scripts that are used by other scripts, you probably do not want to run them from the command line.
Create dirs for a Koha instance.
koha-create-dirs instance1 instance2 etc
List all Koha instances.
Lists Koha instances, optionally only those that are enabled or have email turned on. Usage: koha-list [--enabled] [--email] [-h] Options: --enabled only show instances that are enabled --email only show instances that have email enabled --noemail only show instances that do not have email enabled -h this help The filtering options can be combined, and you probably want to do this (except --email and --noemail, that's just silly.)
Run a command for each Koha instance.
Takes the same arguments as koha-list.
koha-list [--enabled] [--email | --noemail] command
Sorce: http://wiki.koha-community.org/wiki/Commands_provided_by_the_Debian_packages