akeeba:filter:include-database

[Note]Note

Only works with Akeeba Backup Professional.

What it does: Adds an additional database to be backed up by Akeeba Backup.

Syntax: akeeba:filter:include-database [--profile=PROFILE] [--dbdriver=DBDRIVER] [--dbport=DBPORT] [--dbusername=DBUSERNAME] [--dbpassword=DBPASSWORD] [--dbname=DBNAME] [--dbprefix=DBPREFIX] [--check]

Arguments

This command takes no arguments.

Options

--profile=PROFILE

Optional. The backup profile to use. Default: 1.

Keep in mind that filters are set per backup profile. They are not reused across backup profiles.

--dbdriver=DBDRIVER

Optional. The database driver to use to connect to the database. One of

  • mysqli. Use PHP's MySQLi database driver. This is the modern, MySQL-specific driver. Recommended.

  • pdomysql. Use the PHP Data Object (PDO) connector for MySQL. This may be required on servers where the MySQLi driver is not available.

  • mysql. Effectively, this is a synonym to mysqli. There are two reasons for having that. First, it's all too easy to mistype mysqli as mysql (without the trailing i). Second, sites updated from Joomla 3 running on PHP 5.x may have been using that old driver that was removed in PHP 7.0 and later. We don't want to break existing installations so mysql is now nothing more than an alias to mysqli.

--dbport=DBPORT

Optional. The database server port.

It uses the default MySQL port (3306) if not defined.

--dbusername=DBUSERNAME

Optional. The database connection username.

--dbpassword=DBPASSWORD

Optional. The database connection password,

--dbname=DBNAME

Optional. The database name.

--dbprefix=DBPREFIX

Optional. The common prefix of the database table names.

Setting this is not required for taking a backup of the database. However, without setting up a prefix you will NOT be able to change the common table name prefix when restoring the backup.

--check

Optional. Check the database connection before adding the filter.

We strongly advise you to use this option as it will catch mistyping something in the options. There are, however, legitimate reasons to not use this option e.g. if you are setting up a backup profile before setting up the external database it will be backing up.

Exit codes

One of the following exit codes will be set when the command finishes running:

0

The command completed without an error.

1

You have Akeeba Backup Core. This feature is only available in Akeeba Backup Professional.

2

A database inclusion filter with the same connection information already exists.

3

You passed the --check option but PHP reports it cannot connect to the database you specified using the connection information provided.

4

Setting the filter failed.