2019-06-05 21:47:31 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2019-07-26 12:30:13 -04:00
|
|
|
<borg xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xmlns="http://git.square-r00t.net/BorgExtend/tree/storage/backups/borg/"
|
2021-06-30 05:25:52 -04:00
|
|
|
xsi:schemaLocation="http://git.square-r00t.net/BorgExtend/plain/config.xsd"
|
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
2019-06-05 21:47:31 -04:00
|
|
|
<!-- You can have multiple server elements, but each one *MUST* have a unique "target" attribute. -->
|
|
|
|
<!-- "target" = either the local filesystem path (absolute or relative to execution) or the remote host
|
|
|
|
"remote" = 1/true if "target" is a remote host or 0/false if it's a local filepath
|
|
|
|
"rsh" = (remote host only) the ssh command to use. The default is given below.
|
2019-06-05 23:47:26 -04:00
|
|
|
"user" = (remote host only) the ssh user to use.
|
|
|
|
"dummy" = a boolean; if you need to create a "dummy" server, set this to "true".
|
|
|
|
It will *not* be parsed or executed upon.
|
|
|
|
It won't even be created by an init operation or show up in a repolist operation. -->
|
2019-06-05 21:47:31 -04:00
|
|
|
<server target="fq.dn.tld" remote="true" rsh="ssh -p 22" user="root">
|
|
|
|
<!-- You can (and probably will) have multiple repos for each server. -->
|
|
|
|
<!-- "name" = the repositoriy name.
|
|
|
|
"password" = the repository's password for the key. If not specified, you will be prompted
|
|
|
|
to enter it interactively and securely.
|
2019-06-05 23:47:26 -04:00
|
|
|
"dummy" = see server[@dummy] explanation.
|
2019-06-05 21:47:31 -04:00
|
|
|
"compression" = see https://borgbackup.readthedocs.io/en/stable/usage/create.html (-C option) -->
|
|
|
|
<repo name="testrepo" password="SuperSecretPassword" compression="lzma,9">
|
|
|
|
<!-- Each path entry is a path to back up.
|
2019-06-06 00:56:54 -04:00
|
|
|
See https://borgbackup.readthedocs.io/en/stable/usage/create.html
|
|
|
|
Note that globbing, etc. is *disabled* for security reasons, so you will need to specify all
|
|
|
|
directories explicitly. -->
|
2019-06-05 21:47:31 -04:00
|
|
|
<path>/a</path>
|
2019-06-06 00:56:54 -04:00
|
|
|
<!-- Each exclude entry should be a subdirectory of a <path> (otherwise it wouldn't match, obviously). -->
|
2019-06-05 21:47:31 -04:00
|
|
|
<exclude>/a/b</exclude>
|
|
|
|
<!-- Prep items are executed in non-guaranteed order (but are likely to be performed in order given).
|
|
|
|
If you require them to be in a specific order, you should use a wrapper script and
|
|
|
|
use that as a prep item. -->
|
|
|
|
<!-- "inline" = if true/1, the provided text will be temporarily written to disk, executed, and deleted.
|
|
|
|
if false/0, the provided text is assumed to be a single-shot command/path to a script
|
|
|
|
(arguments are not currently supported, but may be in the future). -->
|
|
|
|
<!-- If using inline especially, take note of and use XML escape characters:
|
|
|
|
" = "
|
|
|
|
' = '
|
|
|
|
< = <
|
|
|
|
> = >
|
|
|
|
& = &
|
|
|
|
and note that whitespace (including leading!) *is* preserved. -->
|
|
|
|
<!-- It *MUST* return 0 on success. -->
|
|
|
|
<prep inline="1">#!/bin/bash
|
|
|
|
# this is block text
|
|
|
|
</prep>
|
|
|
|
<prep inline="0">/usr/local/bin/someprep.sh</prep>
|
|
|
|
<!-- Plugins are direct Python modules, and are alternatives to prep items.
|
|
|
|
They must:
|
|
|
|
- be in the Python's path environment (or a path must be provided) either absolute or relative to
|
|
|
|
*execution*, not the script's placement in the filesystem)
|
|
|
|
- contain a class called <module>.Backup() (which will execute all tasks on initialization)
|
|
|
|
See plugins/ directory for examples and below for example of invocation. -->
|
|
|
|
<plugins>
|
|
|
|
<!-- Each plugin item MUST define a "name" attribute. This is the name of the module to import.
|
|
|
|
"path" = (optional) the directory containing the plugin module; it must end in .py -->
|
|
|
|
<plugin name="mysql" path="./plugins">
|
|
|
|
<!-- Param elements are optional. Each param element MUST define a "key" attribute; this is
|
|
|
|
the name of the parameter. (For positional attributes, this should match the name used
|
|
|
|
by the <module>.Backup().init() parameter name.)
|
|
|
|
If you want a parameter to be provided but with a None value, make it self-enclosed
|
|
|
|
(e.g. '<param key="someparam"/>').
|
|
|
|
If you need to serialize pythonic objects (lists, dicts, booleans),
|
|
|
|
then set the "json" attribute to 1/true and provide the data in minified
|
|
|
|
JSON format (also referred to as "compressed JSON") - see "tools/minify_json.py -h". -->
|
|
|
|
<param key="dbs" json="true">["db1","db2"]</param>
|
|
|
|
<param key="splitdumps" json="true">true</param>
|
|
|
|
<param key="dumpopts" json="true">["--routines","--add-drop-database","--add-drop-table","--allow-keywords","--complete-insert","--create-options","--extended-insert"]</param>
|
|
|
|
</plugin>
|
|
|
|
<plugin name="ldap" path="./plugins">
|
|
|
|
<param key="server">ldap://my.server.tld</param>
|
|
|
|
<param key="binddn">cn=Manager,dc=server,dc=tld</param>
|
|
|
|
<param key="password">SuperSecretPassword</param>
|
|
|
|
<param key="splitldifs" json="true">false</param>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</repo>
|
2019-06-05 23:47:26 -04:00
|
|
|
<!-- You can also include other snippets. Either absolute paths, paths relative to your backup.xml file,
|
|
|
|
or a URL. -->
|
|
|
|
<xi:include href="sample.config.snippet.xml"/>
|
2019-06-05 21:47:31 -04:00
|
|
|
</server>
|
|
|
|
</borg>
|