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 4.1. Supported types of backup sources:
Type | Description |
---|---|
arangodump | Backup ArangoDB with the arangodump command line tool. |
mongodump | Backup MongoDB with the mongodump command line tool. |
mysqldump | Backup MySQL with the mysqldump command line tool. |
pgdump | Backup PostgresSQL with the pg_dump command line tool. |
redis | Backup redis with the redis-cli command line tool. |
tar | Backup a directory with the tar command line tool. |
xtrabackup | Backup MySQL with the percona xtrabackup command line tool. |
Backup a ArangoDB database with arangodump.
Table 4.2. arangodump-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
endpoint | string | no | tcp://localhost:8529 | URI to your ArangoDB endpoint. |
username | string | no | null | Username for the ArangoDB authentication. |
password | string | no | null | Password for the ArangoDB authentication. |
disableAuthentication | boolean | no | false | Disable the ArangoDB authentication. |
database | string | no | _system | Database to backup. |
dumpData | boolean | no | true | Dump database data. |
includeSystemCollections | boolean | no | false | Dump system collections as well. |
collections | string | no | all | List of collections to dump. |
Example 4.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" /> </source>
Example 4.2: arangodump JSON example
{ "type": "arangodump", "options": { "database": "myDatabase", "dumpData": "true", "collections": "myCollection1,myCollection2" } }
Backup a MongoDB database with mongodump.
Table 4.3. mongodump-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
host | string | no | localhost | Hostname of your MongoDB-Server. |
user | string | no | OS-User | Username for the MongoDB authentication. |
password | string | no | null | Password for the MongoDB authentication. |
authenticationDatabase | string | no | null | MongoDB database that holds the user credentials. |
databases | string | no | all | List of databases you want to backup, all by default. |
excludeCollections | string | no | null | List of collections you don't want to backup. |
excludeCollectionsWithPrefix | string | no | null | List of collection prefixes to exclude matching collections from backup. |
Example 4.3: mongodump XML example
<!-- source mongodump --> <source type="mongodump"> <option name="databases" value="myDatabase"/> <option name="user" value="user.name"/> <option name="password" value="topsecret"/> <option name="excludeCollections" value="collectionFoo,collectionBar"/> </source>
Example 4.4: mongodump JSON example
{ "type": "mongodump", "options": { "databases": "myDatabase", "user": "user.name", "password": "topsecret", "excludeCollections": "collectionFoo,collectionBar" } }
Backup a MySQL database with mysqldump.
Table 4.4. mysqldump-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
host | string | no | localhost | Hostname of your MySQL-Server. |
user | string | no | OS-User | Username for the MySQL authentication. |
password | string | no | null | Password for the MySQL authentication. |
databases | string | no | all | List of databases you want to backup, all by default. |
ignoreTables | string | no | null | List of tables you don't want to backup. |
filePerTable | true | false | no | false | Create directory with separate files for each table. |
structureOnly | string | no | null | List of tables where only the table structure will be stored. Can not be used with filePerTable |
hexBlob | true | false | no | false | Use the --hex-blob option to dump blog fields in hex. |
lockTables | true | false | no | null | Use the --lock-tables option to lock tables during the dump. |
extendedInsert | true | false | no | false | Use multiple-row INSERT syntax. This results in a smaller dump file and speeds up inserts when the file is reloaded. |
Example 4.5: mysqldump XML example
<!-- source mysqldump --> <source type="mysqldump"> <option name="databases" value="myDatabase"/> <option name="user" value="user.name"/> <option name="password" value="topsecret"/> <option name="ignoreTable" value="tableFoo,tableBar"/> <option name="structureOnly" value="logTable1,logTable2"/> </source>
Example 4.6: mysqldump JSON example
{ "type": "mysqldump", "options": { "databases": "myDatabase", "user": "user.name", "password": "topsecret", "ignoreTable": "tableFoo,tableBar", "structureOnly": "logTable1,logTable2" } }
Backup a MySQL database with percona xtrabackup.
Table 4.5. xtrabackup-options
Name | Value | Required | Default | Description |
---|---|---|---|---|
dataDir | string | no | MySQL data directory. | |
host | string | no | localhost | Host to connect to. |
user | string | no | OS-User | User to connect with. |
password | string | no | false | Password to authenticate the user. |
databases | string | no | - | List of databases to backup, all by default. |
include | string | no | - | Pattern to include databases and tables to the backup e.g. ^mydatabase[.]mytable . |
Example 4.7: xtrabackup XML example
<!-- source xtrabackup --> <source type="xtrabackup"> <option name="databases" value="myDB1,myDB2" /> </source>
Example 4.8: xtrabackup JSON example
{ "type": "xtrabackup", "options": { "databases": "myDB1,myDB2" } }
Backup PostgresSQL databases using the pg_dump command line tool.
Table 4.6. pgdump-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
pathToPgdump | string | no | - | Path to the pg_dump binary. |
host | string | no | - | Host to connect to. |
port | integer | no | - | Port to use to connect to the PostgresSQL server. |
user | string | no | - | User to use to connect. |
password | string | no | - | Password to use to authenticate. |
database | string | yes | - | Database to backup. |
schemaOnly | bool | no | false | Dump only schema information. |
dataOnly | string | no | false | Dump no schema information. |
schemas | string | no | - | List of schemas to dump, separated by comma. |
excludeSchemas | string | no | - | List of schemas to exclude, separated by comma. |
tables | string | no | - | List of tables to backup, separated by comma. |
excludeTables | string | no | - | List of tables to exclude, separated by comma. |
excludeTableData | string | no | - | List of tables where data is not dumped, separated by comma. |
noPermissions | bool | no | false | Don't dump any permission schemas. |
noOwner | bool | no | false | Don't dump any owner changing statements. |
format | string | no | plain | Dump format, plain, custom, directory. |
encoding | string | no | - | Set the dump encoding. |
Example 4.9: pgdump XML example
<!-- source pgdump --> <source type="pgdump"> <option name="database" value="myDstabase"/> <option name="user" value="myName"/> <option name="password" value="topSecret"/> </source>
Example 4.10: pgdump JSON example
{ "type": "pgdump", "options": { "database": "myDatabase", "user": "myName", "password": "topSecret", } }
Backup redis data structure store using redis-cli.
Table 4.7. redis-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
pathToRedisData | string | yes | - | Path to the redis data .rdb file. |
pathToRedisCli | string | no | - | Path to the redis-cli binary. |
port | integer | no | 6379 | Port to use to connect to the redis server. |
password | string | no | - | Password to use to authenticate. |
Example 4.11: redis XML example
<!-- source redis --> <source type="redis"> <option name="pathToRedisData" value="/var/lib/redis/6379/dump.rdb"/> </source>
Example 4.12: redis JSON example
{ "type": "redis", "options": { "pathToRedisData": "/var/lib/redis/6379/dump.rdb" } }
Backup directories using tar.
Table 4.8. tar-Options
Name | Value | Required | Default | Description |
---|---|---|---|---|
path | string | yes | - | Path to the source directory. |
ignoreFailedRead | boolean | no | false | Ignore changing source directory. |
removeSourceDir | boolean | no | false | Remove the directory after compression. |
Example 4.13: tar XML example
<!-- source tar --> <source type="tar"> <option name="path" value="htdocs/uploads"/> </source>