Commit graph

1057 commits

Author SHA1 Message Date
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
Thomas Waldmann
30509b74b0 acl platform code: fix acl set return type (1.1-maint) 2018-07-05 22:55:17 +02:00
Thomas Waldmann
71b02912c9 xattr: add linux {list,get,set}xattr ctypes prototypes 2018-07-03 22:32:37 +02:00
Thomas Waldmann
2d37c9d3f9 xattr: fix darwin flistxattr ctypes prototype 2018-07-03 22:29:35 +02:00
Thomas Waldmann
2d490aa8c8 tests: trying to debug test fails on travis, #3494
- reordered code a little, so files are touched in different order

let's see if this changes anything.

- create_regular_file: giving size AND contents is not supported

the code did not create a 4096 bytes long file, but just a 1 byte
long file. adding an assertion to avoid unsupported usage.
2018-06-30 22:02:10 +02:00
Thomas Waldmann
49b681dd11 tests: fetch less data via os.urandom
freebsd12 is unhappy with having to deliver 50MiB random in one go
and fails with BlockingIOError "temporary unavailable" when trying.

for test_lz4_buffer_allocation, it is good enough to fetch 5MiB and
concatenate that 10 times.

(cherry picked from commit acb15fd960)
2018-06-29 13:46:41 +02:00
Philippe MIOSSEC
32dfdf5dcb docs: improve diff doc
by better displaying the synthax that should be used
(ie `REPO::ARCHIVE1`)

(cherry picked from commit de25f1c3c7)
2018-06-22 22:32:59 +05:30
Rémi Oudin
9a043251a9 borg config --list <repo>, fixes #3612
Add --list option to dump the repo configuration / the default values.

Also: fixes argument order in borg config tests
(cherry picked from commit 73410861ae)
2018-06-08 08:46:10 +02:00
TW
bff2a8256a
Merge pull request #3869 from ThomasWaldmann/review-progress-args
borg prune: improve progress display
2018-06-02 15:51:16 +02:00
Thomas Waldmann
f7c7384285 update bundled lz4 code to 1.8.2 2018-06-02 01:25:52 +02:00
Thomas Waldmann
529bbfdeca borg prune: improve progress display
the old progress output was kind of broken:
Archiver() did output some progress when add_item was called.
Archive.delete() did output progress for a single archive deletion

but what we really want is a overall progress indication, advancing
the progress for each deleted archive.
2018-06-01 22:44:47 +02:00
Thomas Waldmann
857c5635dd fixup: output stats in dry-run mode
it will just show nothing was deleted, but one sees how it would look
like.

this is also for consistency with borg prune --dry-run --stats, which
behaves the same.
2018-05-22 17:18:38 +02:00
Thomas Waldmann
ec4ccc0b6b borg delete: implement --dry-run, fixes #3822 2018-05-22 16:58:52 +02:00
Thomas Waldmann
a88a3153ad borg delete: only commit once, fixes #3823
borg delete was slower than required when it deleted multiple archives
as it committed repo and cache once per archive.

borg prune (doing a similar job) is faster as it commits only once for
all deleted archives.

borg delete now also only commits once and also (similar to borg prune)
only outputs a overall statistics for all deleted archives.

log output of borg delete was made similar to borg prune.
2018-05-22 15:29:08 +02:00
TW
7912fbc610
Merge pull request #3803 from ThomasWaldmann/config-repo-without-key
make "borg config repo" possible without key
2018-05-16 18:30:50 +02:00
Thomas Waldmann
959beb867b xattrs: fix borg exception handling on ENOSPC error, fixes #3808 2018-05-11 16:28:45 +02:00
Thomas Waldmann
322b442641 fix borg config --cache (make sure cache gets closed via try/finally) 2018-05-07 23:54:02 +02:00