Commit graph

895 commits

Author SHA1 Message Date
Thomas Waldmann
573733bc81 fixup: only works for local repos 2017-09-06 04:06:17 +02:00
Thomas Waldmann
b9dce0ebdc with-lock: close segment file before invoking subprocess 2017-09-06 03:49:45 +02:00
TW
86c0b66de3 Merge pull request #2988 from ThomasWaldmann/recover-segments-memory-usage
recover_segment: use mmap(), fixes #2982
2017-09-02 17:48:04 +02:00
Thomas Waldmann
9fc4d00bf6 recover_segment: use mmap(), fixes #2982 2017-09-01 05:26:27 +02:00
Thomas Waldmann
57f808e4bb add debug logging for repository cleanup
so we can know whether it did a cleanup and if so,
which and how many segments were cleaned up.
2017-08-31 22:49:30 +02:00
TW
4a22dec340 Merge pull request #2979 from enkore/issue/2975
test_detect_attic_repo: don't test mount
2017-08-30 23:22:36 +02:00
Marian Beermann
a6be34f8f7 test_detect_attic_repo: don't test mount
since mount is not always available and if it works for all the other
commands, then it is likely it works for mount as well.
2017-08-28 10:17:52 +02:00
Marian Beermann
b8793d9577 keymanager: don't depend on optional readline module 2017-08-28 10:15:38 +02:00
enkore
f7ed5d7220 Buffer: fix wrong thread-local storage use (#2951)
Buffer: delete support for multiple threads

Thread-local objects are a fairly complex footgun, so avoid them in
the first place. When a Compressor uses a Buffer (for example),
just create multiple Compressor instances for each thread, owned by
each thread. Minimize multiple ownership of objects across
threads if at all possible!
2017-08-25 04:45:22 +02:00
TW
95d267493e Merge pull request #2959 from ThomasWaldmann/fix-timestamp-option
borg create --timestamp: set start time, fixes #2957
2017-08-25 04:36:44 +02:00
Thomas Waldmann
8a299ae24c borg create --timestamp: set start time, fixes #2957 2017-08-24 04:07:37 +02:00
enkore
1ac49380b1 Merge pull request #2925 from enkore/issue/2376
Datetime formatting
2017-08-22 17:33:17 +02:00
Marian Beermann
ab4981eff6 always use microseconds for ISO 8601 output 2017-08-22 17:32:25 +02:00
Marian Beermann
2ff29891f1 list: fix weird mixup of mtime/isomtime 2017-08-22 17:32:21 +02:00
Marian Beermann
a836f451ab one datetime formatter to rule them all
# Conflicts:
#	src/borg/helpers.py
2017-08-22 17:32:21 +02:00
enkore
5fb2b4b0a6 Merge pull request #2842 from imsodin/diffmount-diff_refactor
Refactor diff functionality
2017-08-21 13:49:50 +02:00
enkore
8af5a0a272 Merge pull request #2953 from enkore/issue/2949
create: document exclusion through nodump
2017-08-21 12:20:22 +02:00
enkore
8dc79aea7a Merge pull request #2950 from enkore/f/mt-1.5b
cache: adjust AdHocCache API
2017-08-21 12:19:20 +02:00
Marian Beermann
495f838d88 create: document exclusion through nodump 2017-08-20 21:37:17 +02:00
Marian Beermann
c5a154985f cache: adjust AdHocCache API (test_create_no_cache_sync) 2017-08-20 21:23:55 +02:00
Thomas Waldmann
c8920fa2e6 ignore corrupt files cache, fixes #2939
ignore the files cache when corrupt and emit a warning message
so the users notices that there is a problem.

(cherry picked from commit 4eadb59c10)
2017-08-19 01:13:12 +02:00
enkore
11653d8bc2 Merge pull request #2920 from lfos/detect-attic-repos
Detect non-upgraded Attic repositories
2017-08-16 17:47:02 +02:00
Lukas Fleischer
0943b322e3 Detect non-upgraded Attic repositories
When opening a repository, always try to read the magic number of the
latest segment and compare it to the Attic segment magic (unless the
repository is opened for upgrading). If an Attic segment is detected,
raise a dedicated exception, telling the user to upgrade the repository
first.

Fixes #1933.
2017-08-15 19:58:30 +02:00
Simon Frei
9dc22d230f Refactor the diff functionality
This factors out a lot of the logic in do_diff in archiver.py to Archive in
archive.py and a new class ItemDiff in item.pyx. The idea is to move methods
to the classes that are affected and to make it reusable, primarily for a new
option to fuse (#2475).
2017-08-13 21:23:04 +02:00
Thomas Waldmann
5bad764637 fixup: use asserts for the old_id check 2017-08-11 23:24:33 +02:00
Thomas Waldmann
6f94949a36 migrate locks to child PID when daemonize is used
also:

increase platform api version due to change in get_process_id behaviour.
2017-08-08 03:46:44 +02:00
Thomas Waldmann
6d2b3bc7cd test json timestamps for iso format 2017-08-07 23:35:10 +02:00
Thomas Waldmann
6133f1bb60 repo last_modified: use iso8601 timestamp format with --json
like yyyy-mm-ddThh:mm:ss - no tz yet, this likely needs more refactoring
to tz aware and utc datetime objects everywhere, currently there are
naive datetime objects and also localtime at quite some places.
2017-08-07 23:35:10 +02:00
Thomas Waldmann
1df7af58ae archives list: use iso8601 timestamp format with --json
like yyyy-mm-ddThh:mm:ss - no tz yet, this likely needs more refactoring
to tz aware and utc datetime objects everywhere, currently there are
naive datetime objects and also localtime at quite some places.
2017-08-07 23:35:10 +02:00
Thomas Waldmann
09c111bb44 archive listing: use iso8601 timestamp format with --json-lines
like yyyy-mm-ddThh:mm:ss - no tz yet, this likely needs more refactoring
to tz aware and utc datetime objects everywhere, currently there are
naive datetime objects and also localtime at quite some places.
2017-08-07 23:35:10 +02:00
Thomas Waldmann
3e78549f76 helpers: split into smaller modules 2017-08-07 23:05:46 +02:00
Thomas Waldmann
a5f7c7a1ce helpers: fix imports and helpers.exit_code location
code expects to be able to assign to helpers.exit_code (which stopped
working correctly when exit_code was moved to helpers.misc module).
2017-08-07 23:05:46 +02:00
Thomas Waldmann
558282df58 helpers: create package
just created package dir and __init__.py and
moved helpers.py to helpers/misc.py - no other changes.

not functional, some imports need fixing...
2017-08-07 23:05:45 +02:00
enkore
a1840e9238 Merge pull request #2918 from ThomasWaldmann/fix-serve-exitcode
fix exitcode of borg serve, fixes #2910
2017-08-06 10:56:34 +02:00
Thomas Waldmann
583de3eeb1 fix exitcode of borg serve, fixes #2910 2017-08-06 04:18:49 +02:00
Simon Frei
37f75519cf Only style changes - still NOT functional 2017-08-06 01:46:20 +02:00
Simon Frei
9f6df7d999 Only move and change indendation of code - NOT functional 2017-08-06 01:42:32 +02:00
Simon Frei
b6c2055276 Only compare contents when chunker params match (fixes #2899) 2017-07-30 21:39:35 +02:00
enkore
4f57e3a7c4 Merge pull request #2890 from enkore/f/mt-1c
archive: create FilesystemObjectProcessors class
2017-07-30 18:22:50 +02:00
Thomas Waldmann
12df5e625a use python 3.5's os.scandir
the removed stuff was only required for < 3.5.
2017-07-29 21:13:57 +02:00
Thomas Waldmann
4c840ee24d use python 3.5's os.set_blocking 2017-07-29 21:13:57 +02:00
Thomas Waldmann
a5c6a50ebe increase Python minimum requirement to 3.5.0
also:
- drop testing on 3.4
- add some TODO for the docs and vagrant machines
2017-07-29 20:55:04 +02:00
Marian Beermann
a88519d540 archive: delete unused Archive.list_archives 2017-07-29 19:37:37 +02:00
Marian Beermann
c93dba0195 archive: create FilesystemObjectProcessors class 2017-07-29 19:37:37 +02:00
enkore
bccff3413b Merge pull request #2889 from enkore/f/mt-1b
multithreading: item.to_optr(), Item.from_optr()
2017-07-29 17:27:18 +02:00
Marian Beermann
d286d753cb item: item.to_optr(), Item.from_optr() 2017-07-29 17:26:39 +02:00
enkore
7b35b1ef24 Merge pull request #2888 from enkore/f/remove-gcm
crypto: fixes & remove AES-GCM
2017-07-29 17:24:16 +02:00
enkore
5abfa0b266 Merge pull request #2887 from enkore/f/mt-1a
multithreading: add pyzmq dep, chunker GIL
2017-07-29 14:36:01 +02:00
Marian Beermann
e57dd4bc9e crypto: avoid bad prototype codegen from cython
(-Wstrict-prototypes, Cyton forgets a "void")
2017-07-29 12:28:33 +02:00
Marian Beermann
630e45b742 crypto: fix wrong use of const 2017-07-29 12:28:06 +02:00