Commit Graph

549 Commits

Author SHA1 Message Date
Nicolas KAROLAK
b09529e96b Fix(restic) wait between retries
Too quick retry could lead to locking issue.
2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
acee92fef5 Fix(restic) remove verbose option
BackupNinja does not capture command output so this option is useless,
plus it make check command fails.
2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
0b9117b39f Fix(restic) getconf retry_run 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
bceee65ed8 restic: make number of retries configurable 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
b148b3c9ef restic add retry function 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
45a04e485c restic: start working on handler 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
76043a056e restic: add build target 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
052f45ebb1 restic: rename file with .in extension 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
570c3aae5e restic: do not run backup and forget by default 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
7e55bb789a restic: fix some shellscript warnings 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
8082d3d04a restic: add missing swift region option 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
c0426653fc restic: add dry_run option on check command 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
3d84e15c27 restic: fix var conflict & add export_debug function 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
aa76a363ad restic: add options & cleanup some sebug/fatal messages 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
d6bbe6635c change indent from 3 to 2 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
3103b6bf32 fix missing quotes around repo & passwd variables 2021-01-10 16:26:22 -05:00
Nicolas KAROLAK
ca028e1959 init restic support 2021-01-10 16:26:22 -05:00
Jerome Charaoui
568dbaa9fd whitespace fixes 2021-01-09 23:29:29 -05:00
Jerome Charaoui
21f75544e8 borg: use autotools abstraction for sed path 2021-01-09 23:29:20 -05:00
Jerome Charaoui
c18404eb3a borg: add new setting sshoptions, fixes #11310 2021-01-09 17:21:29 -05:00
Jerome Charaoui
fe8778618f borg: fix connection test when remote dir exists
When testing the connection via ssh forced command, if the remote path
is an empty directory (instead of nonexistent), the handler bails even
tough the connection is successful.

Co-authored-by: Emil Breiner <emil.breinr@krumedia.com>
2021-01-08 23:35:21 -05:00
Jerome Charaoui
69df0f16f6 borg: implement ignore_missing option 2021-01-08 20:31:31 -05:00
Jerome Charaoui
e1b4a823d3 borg: emit warning if rc=1, fixes #11311 2021-01-08 14:19:13 -05:00
Jerome Charaoui
eae7f4fe98 rdiff: log execution steps 2021-01-06 22:36:20 -05:00
Jerome Charaoui
b93af54bed dup: log execution steps 2021-01-06 22:36:20 -05:00
Jerome Charaoui
8386cde02c borg: log execution steps 2021-01-06 22:36:20 -05:00
Jerome Charaoui
86c6b19119 Merge branch 'bugfix-borg-handler-create-options' into 'master'
Quoting test of $create_options in borg handler

Closes #11304

See merge request liberate/backupninja!39
2021-01-06 19:35:59 -08:00
Jerome Charaoui
85f4ea886a rsync: improve initial directory creation
The code added in the previous commit is only relevant for the mirror
format. With the long format, directories are created correctly in the
rotation routine. For the short format, the directory is initially
created, but only for a local destination, so adding a short snippet to
the rotation routine does it.
2021-01-06 20:52:32 -05:00
Fabian Raab
a2646868b3 Create path hirarchy of source path automatically in destination
Before it was only possible to backup root directories (depth one, eg.
/etc, /var, /usr, …). For example consider the following truncated toy
configuration for rsync:

    [general]
    mountpoint = /media/
    backupdir = backup
    [source]
    include = /foo/bar
    include = /etc

We assume you have prepared the existent but empty base-directory
/media/backup/ at your destination, then against the expectation, the
following error rises:

    rsync: mkdir "/media/backup/foo/bar/" failed: No such file or directory (2)

The reason is that rsync will take the files from the folder /foo/bar/
and tries to put them into the ulitmate – and therefore existent –
destination /media/backup/foo/bar. This is not what you would expect,
since the prepared directory /media/backup exists and the application
should create the rest itself.

This Merge Request adds a little script which creates the required
directories in the destination before running rsync. It assumes that
the base-directory already exists, so that not too much directories
are created automatically (could be a mess if you accidentally type the
wrong path)
2021-01-06 20:49:44 -05:00
Jerome Charaoui
7c8ba1e71e rsync: improve log msgs, add debug for rsync success 2021-01-06 20:40:05 -05:00
Jerome Charaoui
e017810941 rdiff: add extra sanity check for keep parameter 2021-01-06 11:33:58 -05:00
Jerome Charaoui
db7daa3d59 rdiff: make version check more verbose in debug 2021-01-06 11:33:24 -05:00
Jerome Charaoui
f1d876be82 rdiff: fix typo 2021-01-06 11:33:05 -05:00
Jerome Charaoui
9f5952ce34 dup: streamline encryption and signing logic 2021-01-05 11:00:54 -05:00
Jerome Charaoui
d949454366 dup: bandwidthlimit is compatible with desturl
However it's not compatible with local filesystem desturl.
2021-01-05 10:59:49 -05:00
Jerome Charaoui
f007227e4c dup: execute ssh connection test in test mode
Also bring in line with the code used in other handlers.
2021-01-05 10:56:26 -05:00
Jerome Charaoui
e657d42aab dup: improve sanity checks
* also validate desthost and destuser when desturl undefined
 * move desturl vs destuser/host/dir warning in sanity checks section
 * ensure includes are specified
 * drop checks on local destination, duplicity autocreates directory
 * add some needed whitespace
2021-01-05 10:52:46 -05:00
Jerome Charaoui
02c28a7899 borg: improve destination checks 2021-01-03 14:31:12 -05:00
Jerome Charaoui
70f11dd701 borg: add envvar changes to debug log 2021-01-03 14:30:20 -05:00
Jerome Charaoui
45e4c5831c borg: raise fatal error for missing includes 2021-01-03 12:18:46 -05:00
Jerome Charaoui
beff3adc1e Remove remaining vserver bits 2021-01-03 12:07:56 -05:00
Jerome Charaoui
40a346ff13 rsync: change id_dsa to id_rsa in rsync handler, fixes #11315
Also changed in example config.
2021-01-02 15:56:54 -05:00
Jerome Charaoui
eabda5615c Remove vserver support (fixes #11289)
This is probably completely unused by now, as vservers have been
superseeded by alternative technology for many years already.
2021-01-02 15:27:32 -05:00
Jerome Charaoui
076ef20ead borg: fix typos in debug messages 2021-01-02 14:59:58 -05:00
Jerome Charaoui
fe30b5cce3 tar: add support from zstd compression filter 2021-01-02 13:49:41 -05:00
Jerome Charaoui
ff2376f56c tar: properly default to gzip in case of unknown compress filter 2021-01-02 13:49:22 -05:00
lavamind
ac8b41eb87 Merge branch 'fix_11316' into 'master'
Support LUKS v2 headers, fixes #11316

Closes #11316

See merge request riseuplabs/backupninja!47
2020-12-31 08:12:39 -08:00
Gabriel Filion
5c6c583181 Enable use of ionice for all handlers to alleviate IO load
On some workloads, a process creating backups should not become so
aggressive on resources that it prevents normal activity of a machine
from running. It is especially important when writing to disk.

One way to make backups have less impact on the main workload is to
force backups to a lower ionice level.

With the new ionicelevel configuration, it becomes possible for users to
activate the use of ionice and to define the level within the
best-effort class to better suit their needs.
2020-12-31 02:08:50 -05:00
Jerome Charaoui
79903cd689 Replace dd with cryptsetup luksHeaderBackup
Since the luks headers backup was introduced in the handler, cryptsetup
has gained the "luksHeaderBackup" command. We should use this instead
of dd, as it is likely more reliable. Plus, it supports backing up luks
version 2 headers, which the current code doesn't handle.
2020-12-30 15:25:30 -05:00
Jerome Charaoui
c655eceaa3 Reuse lsblk command to list devices for luksheaders
The previous sfdisk-based command would also list partitions, leading to
partition-based luks volumes being duplicated. Instead, reuse the same
command used in the partition backup component.
2020-12-30 15:20:02 -05:00