2015-07-19 03:35:29 +02:00
|
|
|
from functools import partial
|
|
|
|
|
2015-07-28 06:47:52 +02:00
|
|
|
from atticmatic.config import Section_format, option
|
2015-07-19 03:35:29 +02:00
|
|
|
from atticmatic.backends import shared
|
|
|
|
|
|
|
|
# An atticmatic backend that supports Borg for actually handling backups.
|
|
|
|
|
|
|
|
COMMAND = 'borg'
|
2015-07-28 06:47:52 +02:00
|
|
|
CONFIG_FORMAT = (
|
|
|
|
shared.CONFIG_FORMAT[0], # location
|
2015-09-03 07:48:07 +02:00
|
|
|
Section_format(
|
|
|
|
'storage',
|
|
|
|
(
|
|
|
|
option('encryption_passphrase', required=False),
|
|
|
|
option('compression', required=False),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
shared.CONFIG_FORMAT[2], # retention
|
2015-07-28 06:47:52 +02:00
|
|
|
Section_format(
|
|
|
|
'consistency',
|
|
|
|
(
|
|
|
|
option('checks', required=False),
|
|
|
|
option('check_last', required=False),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
2015-07-19 03:35:29 +02:00
|
|
|
|
|
|
|
|
2015-09-03 07:48:07 +02:00
|
|
|
initialize = partial(shared.initialize, command=COMMAND)
|
2015-07-19 03:35:29 +02:00
|
|
|
create_archive = partial(shared.create_archive, command=COMMAND)
|
|
|
|
prune_archives = partial(shared.prune_archives, command=COMMAND)
|
|
|
|
check_archives = partial(shared.check_archives, command=COMMAND)
|