Commit Graph

36 Commits

Author SHA1 Message Date
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
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
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
076ef20ead borg: fix typos in debug messages 2021-01-02 14:59:58 -05: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
Emil Breiner
582024f4bf Quoting test of $create_options in borg handler
The check for the string length in the condition for appending the $create_options fails because it isn't a string. Fixed with quoting the variable.

Change-Id: I6bdacb81f25cf924dc61e3aa6f4b8ebfbe09da65
Signed-Off-By: Emil Breiner <emil.breiner@krumedia.com>
2020-09-08 12:13:23 +02:00
Guillaume Subiron
10b8887b8e Merge branch 'borg_cache_dir_location' into 'master'
Borg cache dir location

See merge request riseuplabs/backupninja!29
2020-08-14 05:46:34 -07:00
LeLutin
e28da8c390 borg: add configuration to displace the cache directory
borg will by default create its cache directory in ~/.cache/borg. This
means that during backup runs, borg will read and write quite
extensively from/to this directory.

In some situations, it is rather undesirable to have this amount of IO
activity in this location and it would make sense to tell borg to place
its cache elsewhere. This can help for example with placing the cache on
a hard drive where the added IO load will not have as big of an impact
on other running activity for the system.

This change also makes sure that the cache directory environment
variable is cleared out when the configuration option is unset. This
should avoid unpleasant surprises when this environment variable is set
to some unknown value in the context where backupninja is called, which
could lead to borg reading and writing to random places on the system.
2020-08-14 05:46:34 -07:00
tiredpixel
3d7494bfc2 handlers/borg: add port support
This enables the handlers to be used for hosts which use a non-standard
port, such as is offered by some commercial services. Default to port
22, so it's optional and backwards-compatible.
2020-07-16 08:38:46 +00:00
Jerome Charaoui
0d9b10890e [borg] use alternative repo ssh location syntax
This adds the ability to specify an alternative SSH port within
the host variable.
2018-06-06 22:03:24 -04:00
Jerome Charaoui
0132b2453a [borg] scrap exclude*, add create_options
This allows the handler to fully make use of the advanced command-line
options for "borg create", such as the replaced "exclude*" options and
others like "--read-special" and "--numeric-owner".
2018-01-26 11:47:47 -05:00
Jerome Charaoui
e114ff68f4 [borg] remove unnecessary test on $keep 2018-01-26 11:37:04 -05:00
Jerome Charaoui
e9824c0d7d [borg] enable BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK
Otherwise the handler may hang, waiting for user input. This may occur
when the borg cache is deleted, or when borg is upgraded.
2018-01-26 11:32:04 -05:00
Jerome Charaoui
f43c85662d [borg] replace "keep*" options with simpler "keep"
The effect of "keep*" options is not straightforward to understand, so
replacing it with a simpler "keep" option, which replicates the
functionality of other backupninja handlers. This also simplifies the
helper, as the use is then only asked how many days of backups to keep.

At the same time, we add "prune_options" which allows for the use of the
"keep*" options as well as other useful prune options, like "--prefix".
2018-01-26 11:26:37 -05:00
Jerome Charaoui
fc0e0849dc [borg] add init option to allow skipping init command
In some cases it may be desirable to skip repository initialization, for
example when the repository is located at the root of a mount point.
2018-01-26 09:53:54 -05:00
Jerome Charaoui
a95457346e [borg] fix whitespace issue 2018-01-26 09:43:58 -05:00
Jerome Charaoui
6a3a8321f0 [borg] build/debug prunestr only if prune = yes 2018-01-26 09:43:58 -05:00
Jerome Charaoui
54cc8c6b32 [borg] support for --exclude-caches and --exclude-nodump 2018-01-26 09:43:58 -05:00
Jerome Charaoui
fcdbaa3447 [borg] add bwlimit config (sets --remote-ratelimit) 2018-01-26 09:43:58 -05:00
Jerome Charaoui
830a00759f [borg] add 'prune' setting to allow disabling pruning 2018-01-26 09:43:58 -05:00
Jerome Charaoui
a02a598bb5 [borg] change archive name to match borg default
Archive names must be unique, so if the backup runs more than once per
day with the previous default, it will throw and error because of the
duplicate archive name. This is also consistent with the addition of
the keephourly prune option.
2018-01-26 09:43:58 -05:00
Jerome Charaoui
245454b7dd [borg] fix default handler value for encryption 2018-01-26 09:43:58 -05:00
Jerome Charaoui
bd4c3be7ae [borg] make indentation consistent with rest of file 2018-01-26 09:43:58 -05:00
Jerome Charaoui
88adbaa990 [borg] support keephourly option 2018-01-26 09:43:58 -05:00
Ben
70873857b7 [borg] fixed connection testing (thanks @orel) 2018-01-26 09:43:58 -05:00
Ben
02d595baab [borg] added encryption support (credit to @mxroo and @leoberry) 2018-01-26 09:43:58 -05:00
Ben
23d8c68bf8 [borg] added copyright notices 2018-01-26 09:43:58 -05:00
Ben
02b6d883aa [borg] fixed pruning in test mode, don't actually run anything 2018-01-26 09:43:58 -05:00
Ben
060de6853a [borg] added support for local backups, without ssh (host=localhost) 2018-01-26 09:43:58 -05:00