Commit graph

1073 commits

Author SHA1 Message Date
Thomas Waldmann
59e067816e work around the backslash issue, see #4280
thanks to AJ Jordan @strugee for finding this.

while using \\ gives a single backslash when using "borg help pattern"
on the shell, our rendered html docs did not show the single backslash
at all.

i was lazy do dig into that issue, so i just used the word "backslash".

:-)
2019-02-05 01:56:42 +01:00
Thomas Waldmann
7786eea531 check msgpack version, terminate for unsupported versions 2019-02-03 00:00:10 +01:00
TW
b995a1923d
Merge pull request #4298 from ThomasWaldmann/fix-short-hostname-1.1
make "hostname" short, even on misconfigured systems, fixes #4262
2019-02-01 14:22:45 +01:00
TW
8a523a15a3
Merge pull request #4299 from ThomasWaldmann/add-rsh-arg-1.1
Add --rsh command line option to complement BORG_RSH env var. Fixes #1701
2019-02-01 14:22:02 +01:00
Manuel Riel
e99448cc7b Add --rsh command line option to complement BORG_RSH env var. Fixes #… (#4290)
Add --rsh command line option to complement BORG_RSH env var. Fixes #1701
(cherry picked from commit 9ab0a095ab)
2019-02-01 11:21:50 +01:00
Thomas Waldmann
6614918e68 make "hostname" short, even on misconfigured systems, fixes #4262
(cherry picked from commit 111c34f92e)
2019-02-01 11:11:25 +01:00
Manu
aa73488e78 Use f_frsize instead of f_bsize to calculate free space. Fixes #4289
(cherry picked from commit c3a882b509)
2019-02-01 11:02:45 +01:00
Manu
38e6ff0a54 Quit with error message when no config key is provided. Fixes #4223 2019-01-31 22:34:54 +08:00
TW
e35091596d
Merge pull request #4273 from ThomasWaldmann/fix-empty-segment-crash
recover_segment: handle too small segment files correctly, see #4272
2019-01-29 19:18:21 +01:00
Thomas Waldmann
6a119cd410 correctly release memoryview, see #4243
keep "data" as is, use "d" for slices

so that the data.release() call is on the original memoryview and
also we can delete the last reference to a slice of it first.
2019-01-29 15:58:35 +01:00
Thomas Waldmann
c1ddabdef6 recover_segment: handle too small segment files correctly, see #4272
nothing left to recover there, but at least we must not crash in mmap().
2019-01-29 09:03:18 +01:00
Thomas Waldmann
bcdcc428a6 avoid diaper pattern in configparser by opening files, fixes #4263
this will fail early with correct error msg / exception traceback
if a config file is not readable.
2019-01-27 01:36:52 +01:00
Thomas Waldmann
c188a0b0bc add "# cython: language_level=3" directive to .pyx files, fixes #4214
in master branch, it was possible to do this via setup.py's
cythonize() calls, but we do not have them in 1.1.

thus, i modified the source files, setting the language level to 3,
which is supported since long in Cython (3str is only supported since
recently so might fail with older Cython versions).

Before this changeset, current Cython 0.29.x emitted a FutureWarning,
but still compiled. The next major release of Cython is said to emit
an error instead, so this changeset hopefully avoids the build breaking
after a Cython upgrade.
2019-01-05 20:12:32 +01:00
Thomas Waldmann
ca1928c925 on linux, symlinks can't have ACLs, see #4044 2018-12-08 23:11:08 +01:00
Thomas Waldmann
14464161ed invalid locations: give err msg containing parsed location, fixes #4179
(cherry picked from commit 65d8091245)
2018-11-28 01:56:58 +01:00
Thomas Waldmann
8859af731d list repo: add placeholders for hostname and username, fixes #4130
also: use a more generic get_meta() access method to avoid duplication.
(cherry picked from commit e9ac9beef0)
2018-11-28 00:26:26 +01:00
Thomas Waldmann
60347a4dd6 xattr key names must start with user. on linux
... or the call will just error with "operation not supported"

(cherry picked from commit 53971e8e79)
2018-11-17 01:30:57 +01:00
Thomas Waldmann
216d1f810f pytest4 complains if we directly call the fixture function, fixes #4172
just added a normal function with the code, call it from fixture and
also from unittest test method.

(cherry picked from commit d0a01c532e)
2018-11-16 21:56:38 +01:00
ashmodei
29edb0cf37 Fixed wrong an archive's name pattern in CRUD benchmark help. 2018-11-09 15:02:38 +03:00
ashmodei
81f10266e3 Added PATH::archive output for creation function on info log level. 2018-11-09 10:39:03 +03:00
Thomas Waldmann
4f1f98eee3 fixup: the help text is parsed as rst markup, so a lone * is an error
* and ** are interpreted as emphasis and need to be matched for begin
and end of emphasis. the \ in front of it is to get a non-markup *.

(cherry picked from commit 64a53ba43a)
2018-11-04 20:01:18 +01:00
Thomas Waldmann
76185efb84 flake8: fix W605 (invalid escape sequences)
(cherry picked from commit 5c66a60f79)
2018-11-04 19:58:46 +01:00
Thomas Waldmann
78c6d21a08 flake8: fix F841
(cherry picked from commit 10cdadb2f8)
2018-11-04 19:58:17 +01:00
step21
27eeef242a Moving the flags of the compiled regex to the front to fix #4137 2018-11-02 00:37:35 +01:00
step21
2a3b534a61 Fixed link to cachedir spec in fs helper to address #4140 for 1.1-maint 2018-11-02 00:33:19 +01:00
step21
85fa5e67f3 Fixed link to cachedir spec in docs to address #4140 2018-11-02 00:28:48 +01:00
step21
34ee2af6b3 Explicitly convert environment variable to str to address #4136 2018-11-02 00:08:25 +01:00
Manu
975cc33206 Add storage_quota for forced_result if set by serve command. 2018-10-03 23:47:36 +08:00
Łukasz Stelmach
82e37fbd03 read a passphrase from a file descriptor
Read a passpharase from a file descriptor specified in the
BORG_PASSPHRASE_FD environment variable.
2018-09-22 11:33:23 +02:00
Henry-Joseph Audéoud
219e9d082a Forward the format_spec to datetime class
If specified, the argument `format_spec` is forwarded from the method
`OutputTimestamp.__format__` to the method `format_time` method.  Thus,
we are able to specify the format, in a way supported by the class
`datetime`.

The default behaviour of `format_time` is not affected.  The other parts
of code that does not provide a `format_spec` are not affected by the
change.
2018-08-30 10:49:50 +02:00
TW
855ae3f7ee
Merge pull request #4025 from ThomasWaldmann/fix-cachedir-1.1
don't archive tagged dir when recursing an excluded dir, fixes #3991
2018-08-09 15:33:37 +02:00
TW
a38bdd7090
Merge pull request #4023 from ThomasWaldmann/hostname-fqdn-cleanups-1.1
call socket.gethostname only once
2018-08-09 13:28:00 +02:00
TW
059ad8d8ae
Merge pull request #4021 from ThomasWaldmann/init-warning-1.1
init: add warning to store both key and passphrase at safe place(s)
2018-08-09 09:29:11 +02:00
Thomas Waldmann
0fa63d9bac don't archive tagged dir when recursing an excluded dir, fixes #3991
if we are recursing an explicitly excluded directory, we are only
looking for explicitly included items, but we do not need to archive
tagged directories or the tag files themselves - they are all excluded
by the explicit exclusion already.

for performance reasons, we still determine whether a directory is
tagged and if it is, we do not recurse into it as there can't be any
included items in there.

(cherry picked from commit 8256c26cf2)
2018-08-09 09:25:32 +02:00
Thomas Waldmann
382e37feb7 call socket.gethostname only once
(cherry picked from commit d2e2f1b89d)
2018-08-09 09:08:43 +02:00
TW
48ed187279
Merge pull request #4020 from ThomasWaldmann/machine-id-1.1
add BORG_HOST_ID, fixes #3985
2018-08-09 09:01:15 +02:00
Thomas Waldmann
d21da08f85 init: add warning to store both key and passphrase at safe place(s)
(cherry picked from commit 4b31ad123f)
2018-08-09 08:22:00 +02:00
Thomas Waldmann
901e3a7888 add BORG_HOST_ID, fixes #3985
(cherry picked from commit 90348c1de9)
2018-08-09 08:11:05 +02:00
Thomas Waldmann
02dbe5fd5c argparse: work around bad default in py 3.7.0a/b/rc, fixes #3996
(cherry picked from commit 52f1cd4bc6)
2018-08-09 07:52:37 +02:00
Thomas Waldmann
24812b0317 dump-repo-objs: filename layout improvements 2018-08-09 06:49:48 +02:00
Thomas Waldmann
8738e85967 implement borg debug dump-repo-objs --ghost
intended as a last resort measure to export all segment file contents
in a relatively easy to use format.

if you want to dig into a damaged repo (e.g. missing segment files,
missing commits) and you know what you do.

note: dump-repo-objs --ghost must not use repo.list()

because this would need the repo index and call get_transaction_id and
check_transaction methods, which can easily fail on a damaged repo.

thus we use the same low level scan method as we use anyway to get
some encrypted piece of data to setup the decryption "key".
2018-08-09 06:49:48 +02:00
Thomas Waldmann
2b7d65b024 use repository.scan() for dump-repo-objs to get on-disk order
it is also more efficient, avoids random access.
2018-08-09 06:49:48 +02:00
Thomas Waldmann
c2ed0d9ee0 implement borg debug search-repo-objs searchterm 2018-08-09 06:49:48 +02:00
Thomas Waldmann
a9d523d6d8 remove loggerDict.clear() from tearDown method, fixes #3805
It causes problems with the new caching in the py37 logger module.

Removing loggerDict.clear() fixes this and makes the tests work again.
Also, it does not seem to have any negative effect, neither on py36
nor on py37.

See also: https://bugs.python.org/issue34269
2018-07-29 12:43:06 +01:00
Thomas Waldmann
f86bf8a0a8 locking: more logging 2018-07-17 00:18:57 +02:00
Thomas Waldmann
2bf1b29e8e process_alive: add some assertions 2018-07-17 00:18:57 +02:00
TW
ab0da76c5d
Merge pull request #3981 from ThomasWaldmann/fix-cache-lock-timeout-1.1
cache lock: use lock_wait everywhere to fix infinite wait
2018-07-16 23:48:26 +02:00
Thomas Waldmann
2f3e60d9d5 cache lock: use lock_wait everywhere to fix infinite wait
also: clarify docs
2018-07-15 10:51:40 +02:00
Thomas Waldmann
223e739c0a nanorst: add missing blank to exception message
(cherry picked from commit 0d06407087)
2018-07-13 10:44:17 +02:00
Thomas Waldmann
5c71c4f990 fix logic bug in platform module API version check
(cherry picked from commit 2bb23f00af)
2018-07-08 14:53:00 +02:00