Chapter 5. Backup Sources

You can configure multiple Backups in one configuration file. Each backup is represented by a <backup> Tag. To configure the data that is stored use the <source> Tag.

Table 5.1. Supported types of backup sources:

arangodumpBackup ArangoDB with the arangodump command line tool.
mongodumpBackup MongoDB with the mongodump command line tool.
mysqldumpBackup MySQL with the mysqldump command line tool.
pgdumpBackup PostgresSQL with the pg_dump command line tool.
redisBackup redis with the redis-cli command line tool.
rsyncCollect files via the rsync command line tool.
tarBackup a directory with the tar command line tool.
xtrabackupBackup MySQL with the percona xtrabackup command line tool.


Backup a ArangoDB database with arangodump.

Table 5.2. arangodump-Options

endpointstringnotcp://localhost:8529URI to your ArangoDB endpoint.
usernamestringnonullUsername for the ArangoDB authentication.
passwordstringnonullPassword for the ArangoDB authentication.
disableAuthenticationbooleannofalseDisable the ArangoDB authentication.
databasestringno_systemDatabase to backup.
dumpDatabooleannotrueDump database data.
includeSystemCollectionsbooleannofalseDump system collections as well.
collectionsstringnoallList of collections to dump.
pathToArangoDumpstringno Custom arangodump executable location.

Example 5.1: arangodump XML example

<!-- source arangodump -->
<source type="arangodump">
  <option name="database" value="myDatabase" />
  <option name="dumpData" value="true" />
  <option name="collections" value="myCollection1,myCollection2" />

Example 5.2: arangodump JSON example

  "type": "arangodump",
  "options": {
    "database": "myDatabase",
    "dumpData": "true",
    "collections": "myCollection1,myCollection2"


Backup a MongoDB database with mongodump.

Table 5.3. mongodump-Options

hoststringnolocalhostHostname of your MongoDB-Server.
userstringnoOS-UserUsername for the MongoDB authentication.
passwordstringnonullPassword for the MongoDB authentication.
authenticationDatabasestringnonullMongoDB database that holds the user credentials.
databasesstringnoallList of databases you want to backup, all by default.
excludeCollectionsstringnonullList of collections you don't want to backup.
excludeCollectionsWithPrefixstringnonullList of collection prefixes to exclude matching collections from backup.
pathToMongodumpstringno Custom mongodump executable location.

Example 5.3: mongodump XML example

<!-- source mongodump -->
<source type="mongodump">
  <option name="databases" value="myDatabase"/>
  <option name="user" value=""/>
  <option name="password" value="topsecret"/>
  <option name="excludeCollections" value="collectionFoo,collectionBar"/>

Example 5.4: mongodump JSON example

  "type": "mongodump",
  "options": {
    "databases": "myDatabase",
    "user": "",
    "password": "topsecret",
    "excludeCollections": "collectionFoo,collectionBar"

MySQL - mysqldump

Backup a MySQL database with mysqldump.

Table 5.4. mysqldump-Options

hoststringnolocalhostHostname of your MySQL-Server.
userstringnoOS-UserUsername for the MySQL authentication.
passwordstringnonullPassword for the MySQL authentication.
databasesstringnoallList of databases you want to backup, all by default.
ignoreTablesstringnonullList of tables you don't want to backup.
filePerTabletrue | falsenofalseCreate directory with separate files for each table.
structureOnlystringnonullList of tables where only the table structure will be stored. Can not be used with filePerTable
hexBlobtrue | falsenofalseUse the --hex-blob option to dump blog fields in hex.
lockTablestrue | falsenonullUse the --lock-tables option to lock tables during the dump.
singleTransactiontrue | falsenonullUse the --single-transaction option to add BEGIN SQL statement before dumping data from server.
extendedInserttrue | falsenofalseUse multiple-row INSERT syntax. This results in a smaller dump file and speeds up inserts when the file is reloaded.
pathToMysqldumpstringno Custom mysqldump executable location.

Example 5.5: mysqldump XML example

<!-- source mysqldump -->
<source type="mysqldump">
  <option name="databases" value="myDatabase"/>
  <option name="user" value=""/>
  <option name="password" value="topsecret"/>
  <option name="ignoreTable" value="tableFoo,tableBar"/>
  <option name="structureOnly" value="logTable1,logTable2"/>

Example 5.6: mysqldump JSON example

  "type": "mysqldump",
  "options": {
    "databases": "myDatabase",
    "user": "",
    "password": "topsecret",
    "ignoreTable": "tableFoo,tableBar",
    "structureOnly": "logTable1,logTable2"

MySQL - xtrabackup

Backup a MySQL database with percona xtrabackup.

Table 5.5. xtrabackup-options

dataDirstringno MySQL data directory.
hoststringnolocalhostHost to connect to.
userstringnoOS-UserUser to connect with.
passwordstringnofalsePassword to authenticate the user.
databasesstringno-List of databases to backup, all by default.
includestringno-Pattern to include databases and tables to the backup e.g. ^mydatabase[.]mytable.
pathToXtraBackupstringno Custom xtrabackup executable location.

Example 5.7: xtrabackup XML example

<!-- source xtrabackup -->
<source type="xtrabackup">
  <option name="databases" value="myDB1,myDB2" />

Example 5.8: xtrabackup JSON example

  "type": "xtrabackup",
  "options": {
    "databases": "myDB1,myDB2"


Backup PostgresSQL databases using the pg_dump command line tool.

Table 5.6. pgdump-Options

hoststringno-Host to connect to.
portintegerno-Port to use to connect to the PostgresSQL server.
userstringno-User to use to connect.
passwordstringno-Password to use to authenticate.
databasestringyes-Database to backup.
schemaOnlyboolnofalseDump only schema information.
dataOnlystringnofalseDump no schema information.
schemasstringno-List of schemas to dump, separated by comma.
excludeSchemasstringno-List of schemas to exclude, separated by comma.
tablesstringno-List of tables to backup, separated by comma.
excludeTablesstringno-List of tables to exclude, separated by comma.
excludeTableDatastringno-List of tables where data is not dumped, separated by comma.
noPermissionsboolnofalseDon't dump any permission schemas.
noOwnerboolnofalseDon't dump any owner changing statements.
formatstringnoplainDump format, plain, custom, directory.
encodingstringno-Set the dump encoding.
pathToPgdumpstringno Custom pgdump executable location.

Example 5.9: pgdump XML example

<!-- source pgdump -->
<source type="pgdump">
  <option name="database" value="myDstabase"/>
  <option name="user" value="myName"/>
  <option name="password" value="topSecret"/>

Example 5.10: pgdump JSON example

  "type": "pgdump",
  "options": {
    "database": "myDatabase",
    "user": "myName",
    "password": "topSecret",


Backup redis data structure store using redis-cli.

Table 5.7. redis-Options

pathToRedisDatastringyes-Path to the redis data .rdb file.
portintegerno6379Port to use to connect to the redis server.
passwordstringno-Password to use to authenticate.
pathToRedisClistringno Custom redis-cli executable location.

Example 5.11: redis XML example

<!-- source redis -->
<source type="redis">
  <option name="pathToRedisData" value="/var/lib/redis/6379/dump.rdb"/>

Example 5.12: redis JSON example

  "type": "redis",
  "options": {
    "pathToRedisData": "/var/lib/redis/6379/dump.rdb"


Backup files via the rsync command line tool.

Table 5.8. rsync-Options

pathstringyes-Path to file/directory to sync.
hoststringno-Host to connecto to.
userstringno-User to use to authenticate.
deletestringnofalseRemove deleted files locally as well.
isDirSyncstringnofalseKeep the directory instead of archiving it at every phpbu execution.
pathToRsyncstringno Custom rsync executable location.

Example 5.13: redis XML example

<!-- source rsync -->
<source type="rsync">
  <option name="path" value="/tmp/foo"/>

Example 5.14: redis JSON example

  "type": "rsync",
  "options": {
    "path": "/tmp/foo"


Backup directories using tar.

Table 5.9. tar-Options

pathstringyes-Path to the source directory.
excludestringno-Comma separated list of paths to exclude.
ignoreFailedReadbooleannofalseIgnore changing source directory.
compressProgramstringno-Set custom compression program f.e. lbzip2.
removeSourceDirbooleannofalseRemove the directory after compression.
pathToTarstringno Custom tar executable location.

Example 5.15: tar XML example

<!-- source tar -->
<source type="tar">
  <option name="path" value="htdocs/uploads"/>

Example 5.16: tar JSON example

  "type": "tar",
  "options": {
    "path": "htdocs/uploads"

Please open a ticket on GitHub to suggest improvements to this page. Thanks!