101 lines
2.7 KiB
ReStructuredText
101 lines
2.7 KiB
ReStructuredText
|
|
.. highlight:: ini
|
|
|
|
======
|
|
Borg
|
|
======
|
|
|
|
Rattail can invoke the ``borg create`` command, to make one or more
|
|
Borg archives at configured locations. For more about Borg, see
|
|
`<https://www.borgbackup.org/>`_.
|
|
|
|
This allows for multiple destinations so that to be extra super safe,
|
|
you can e.g. make archives at each of:
|
|
|
|
* second drive attached to local machine
|
|
* path on remote machine on local network
|
|
* path on remote machine in the cloud
|
|
|
|
Rattail also will invoke the ``borg prune`` command to keep the
|
|
archive repositories from growing too large etc.
|
|
|
|
|
|
Configuration
|
|
=============
|
|
|
|
You can enable the borg feature like so::
|
|
|
|
[rattail.backup]
|
|
borg.enabled = true
|
|
|
|
The borg feature is *disabled* by default but you can make that
|
|
explicit::
|
|
|
|
[rattail.backup]
|
|
borg.enabled = false
|
|
|
|
|
|
Destination(s)
|
|
--------------
|
|
|
|
Rattail supports multiple destinations for Borg archives; it will run
|
|
``borg create`` (and also ``borg prune``) separately for each defined.
|
|
|
|
As an example we'll show config with 3 destinations; hopefully from
|
|
here you can figure out how to do what you need::
|
|
|
|
[rattail.backup]
|
|
borg.remotes =
|
|
mydrive
|
|
otherserver
|
|
cloudserver
|
|
|
|
borg.remote.mydrive.repo = /mnt/mydrive/borg-storage/myserver
|
|
borg.remote.mydrive.passphrase = sooperseekrit
|
|
|
|
borg.remote.otherserver.repo = borguser@otherserver:/srv/borg-storage/myserver
|
|
borg.remote.otherserver.passphrase = sooperseekrit
|
|
|
|
borg.remote.cloudserver.repo = borguser@cloudserver:/srv/borg-storage/myserver
|
|
borg.remote.cloudserver.passphrase = sooperseekrit
|
|
|
|
The above uses the same Borg encryption passphrase for all 3
|
|
repositories but they could be different if you wanted.
|
|
|
|
If destination is on another server, in some cases you must tell
|
|
Rattail where the Borg binary lives on that server, e.g.::
|
|
|
|
[rattail.backup]
|
|
borg.remotes = cloudserver
|
|
|
|
borg.remote.cloudserver.repo = borguser@cloudserver:/srv/borg-storage/myserver
|
|
borg.remote.cloudserver.passphrase = sooperseekrit
|
|
borg.remote.cloudserver.borg = /path/to/borg
|
|
|
|
|
|
Files to Backup
|
|
---------------
|
|
|
|
This works the same way as for rsync; see
|
|
:ref:`rsync-include-exclude`.
|
|
|
|
However the actual config option names can vary in the following way:
|
|
|
|
If you prefer, or need to differentiate, you can specify the include
|
|
and exclude options with ``borg`` prefix::
|
|
|
|
[rattail.backup]
|
|
borg.include = /home
|
|
borg.exclude = /home/ignoreme
|
|
|
|
If you do specify them that way, Rattail will honor them. But if you
|
|
do not, it also will honor the same options with ``rsync`` prefix::
|
|
|
|
[rattail.backup]
|
|
rsync.include = /home
|
|
rsync.exclude = /home/ignoreme
|
|
|
|
This is because anyone using both rsync *and* borg will likely want
|
|
the same set of files backed up both ways. Also because the rsync
|
|
feature came first...
|