ARCHIVED

Fabian Peter Hammerle 8dcea2dbcb added shortcut '-u' for '--filter-target-url' param 8 years ago
duplitab 76fb7d5360 _duplicity(): throw DuplicityCommandFailedError when duplicity command failed 8 years ago
scripts 8dcea2dbcb added shortcut '-u' for '--filter-target-url' param 8 years ago
tests 76fb7d5360 _duplicity(): throw DuplicityCommandFailedError when duplicity command failed 8 years ago
.gitignore 498e61977f Initial commit 8 years ago
LICENSE 498e61977f Initial commit 8 years ago
README.md a11f02b05c _CollectionStatus.last_incremental_backup_time(): regarded full as incremental fixed 8 years ago
setup.cfg 7c9fc264ed added setup.cfg 8 years ago
setup.py 40acac427d autopep 8 years ago

README.md

duplitab

wrapper for duplicity featuring persistent backup configuration

Configuration

# /etc/duplitab
-   name: home at media backup
    source_path: /home
    target_url: file:///media/backup/home
    encryption: no
-   source_path: /secret/folder
    target_url: sftp://user@server//media/backup/secret
    encrypt_key: ABCDEFGH # gnupg
    # target_via_sshfs: true
-   source_path: /var/www
    target_url: file:///media/backup/web
    selectors:
    -   option: exclude
        shell_pattern: '**/cache'
    -   option: include
        shell_pattern: /var/www/src
    -   option: exclude
        shell_pattern: '**'
    encryption: no

Show Configuration

$ duplitab list --table-style tabular
source type      source host  source path     target url                               encrypt key
-------------  -------------  --------------  ---------------------------------------  -------------
local                         /home           file:///media/backup/home
local                         /secret/folder  sftp://user@server//media/backup/secret  ABCDEFGH
local                         /var/www        file:///media/backup/web
$ duplitab --filter-target-url '.*media/backup/[hs].*' list --table-style tabular
source type      source host  source path     target url                               encrypt key
-------------  -------------  --------------  ---------------------------------------  -------------
local                         /home           file:///media/backup/home
local                         /secret/folder  sftp://user@server//media/backup/secret  ABCDEFGH

Backup

$ duplitab backup
$ duplitab --filter-target-url '.*media/backup/[hs].*' backup

Show Status

$ duplitab --filter-target-url '.*media/backup/[hs].*' status --table-style tabular
target_url                               last full backup     last incremental backup
---------------------------------------  -------------------  -----------------------
file:///media/backup/home                2016-01-01 08:04:04  2016-10-23 08:35:13
sftp://user@server//media/backup/secret  2016-09-22 09:36:14  never