Commit graph

1035 commits

Author SHA1 Message Date
Thomas Waldmann
8deb4dfdda remove skipping the noatime tests on GNU/Hurd, fixes #2710
I recently installed GNU/Hurd 2017 and found the atime test works now.

(cherry picked from commit 49411d1c6c)
2017-06-22 01:03:32 +02:00
Thomas Waldmann
961a2587dc FUSE: fix negative uid/gid crash, fixes #2674
they could come into archives e.g. when backing up
external drives under cygwin.

(cherry picked from commit ccd066f0af)
2017-06-21 03:15:22 +02:00
Thomas Waldmann
34a821178f don't write to disk with --stdout, fixes #2645
if we always give stdout to extract_item(), it gets into the stdout-
processing branch which only emits data from items that have chunks
and does nothing for items which don't.

(cherry picked from commit 0b00c14c27)
2017-06-21 03:05:03 +02:00
Thomas Waldmann
7846ef2e69 remove attic dependency of the tests, fixes #2505
attic.tar.gz contains a repo + corresponding keyfile - all the
upgrader module tests need.

.tar.gz because the .tar was 20x bigger.

(cherry picked from commit fed5873e29)
2017-06-21 03:00:52 +02:00
Marian Beermann
aafbaaea20 cache sync: check Operation.READ compatibility with manifest
(cherry picked from commit c9c227f2ca)
2017-06-21 00:53:49 +02:00
Thomas Waldmann
0b46c0d192 enable remote tests on cygwin
the cygwin issue that caused these tests to break was fixed in cygwin
at least since cygwin 2.8.0 (maybe even since 2.7.0).

also added a comment to our workaround (os_write wrapper, that is needed
still for people running older cygwin versions) that it can be removed
when cygwin 2.8.0 is considered ancient (and everybody has upgraded to
some fixed version).

(cherry picked from commit 4766d66875)
2017-06-21 00:49:29 +02:00
Marian Beermann
1de042f9e5 key file names: limit to 100 characters (not bytes)
(cherry picked from commit 38ed9a20af)
2017-06-21 00:39:24 +02:00
Marian Beermann
649afe0c17 key file names: remove colons from host name
(cherry picked from commit 4b8a04b5e7)
2017-06-21 00:37:46 +02:00
Martin Hostettler
6ce476a42b Add tests for cache compatibility code. 2017-06-08 21:38:59 +02:00
Martin Hostettler
fb128fbf84 Cache: Wipe cache if compatibility is not sure
Add detection of possibly incompatible combinations
of the borg versions maintaining the cache and the featues used.
2017-06-08 20:36:56 +02:00
Martin Hostettler
7f57086223 permit manifest version 2 as well 1 one. 2017-06-08 20:36:55 +02:00
Martin Hostettler
ca5ea4f53d Add tests for mandatory repository feature flags. 2017-06-08 20:36:55 +02:00
Martin Hostettler
8783460fc3 Add minimal version of in repository mandatory feature flags.
This should allow us to make sure older borg versions can be cleanly
prevented from doing operations that are no longer safe because of
repository format evolution. This allows more fine grained control than
just incrementing the manifest version. So for example a change that
still allows new archives to be created but would corrupt the repository
when an old version tries to delete an archive or check the repository
would add the new feature to the check and delete set but leave it out
of the write set.

This is somewhat inspired by ext{2,3,4} which uses sets for
compat (everything except fsck), ro-compat (may only be accessed
read-only by older versions) and features (refuse all access).
2017-06-08 20:36:54 +02:00
Thomas Waldmann
73dea37432 use _host to store host/ipv4/ipv6
for ipv6, it includes the outer square brackets.

the host property strips any outer square brackets.
2017-05-23 15:31:08 +02:00
Benedikt Neuffer
97c770e318 ipv6 address support
also: Location: more informative exception when parsing fails
2017-05-23 15:31:04 +02:00
Marian Beermann
d9681c6b15 fuse: fix crash if empty (None) xattr is read 2017-05-23 15:27:39 +02:00
Marian Beermann
fa9cef7abf mount: do pre-mount checks before opening repository 2017-05-23 15:26:12 +02:00
Marian Beermann
450146e6ca mount: check llfuse is installed before asking for passphrase 2017-05-23 15:25:41 +02:00
Marian Beermann
8ca7faaf1e note -v/--verbose requirement on affected options
This is fixed in 1.1.
2017-05-21 16:55:19 +02:00
Marian Beermann
1c6cefbee7 Revert "Merge pull request #1971 from leo-b/1.0-maint-patterns"
This reverts commit d188886269, reversing
changes made to c688b1be85.

# Conflicts:
#	borg/archiver.py
2017-05-15 23:41:09 +02:00
Marian Beermann
6335d593ab Revert "Merge pull request #2231 from leo-b/1.0-maint-patterns"
This reverts commit 9a5bc514b3, reversing
changes made to 8b5ad3819c.
2017-05-15 23:38:17 +02:00
Marian Beermann
173ecfddb4 Revert "Merge pull request #2401 from ThomasWaldmann/patterns-style-default-1.0"
This reverts commit 7a4e9e7a6f, reversing
changes made to b007808706.
2017-05-15 23:37:28 +02:00
Thomas Waldmann
6a929c689e embrace y2038 issue to support 32bit platforms
(cherry picked from commit de76a6b821)
2017-04-29 23:56:53 +02:00
enkore
939855af79 Merge pull request #2456 from ThomasWaldmann/doc-updates-backports-1.0
doc updates backported to 1.0
2017-04-28 22:09:31 +02:00
Thomas Waldmann
5ed63479c1 be more clear that this is a "beyond repair" case, fixes #2427
(cherry picked from commit 697942cd01)
2017-04-28 21:30:16 +02:00
Thomas Waldmann
a87f35b0cc add hint about chunker params to borg upgrade docs, fixes #2421
(cherry picked from commit f0188449c3)
2017-04-28 19:37:28 +02:00
Thomas Waldmann
c8c773bac3 clarify borg upgrade docs, fixes #2436
(cherry picked from commit ca6257dd48)
2017-04-28 19:34:58 +02:00
TW
1cf4740c59 Merge pull request #2400 from ThomasWaldmann/rename-with-placeholders-1.0
borg rename: expand placeholders, fixes #2386
2017-04-09 20:48:05 +02:00
TW
7a4e9e7a6f Merge pull request #2401 from ThomasWaldmann/patterns-style-default-1.0
support switching the pattern style default in patterns file
2017-04-09 20:47:51 +02:00
Thomas Waldmann
8f86f2a732 add test for borg delete --force
(cherry picked from commit 2ad5f903fe)
2017-04-07 05:53:14 +02:00
Thomas Waldmann
e653e1e273 support switching the pattern style default in patterns file
(cherry picked from commit 42371181fc)
2017-04-07 05:35:33 +02:00
Thomas Waldmann
11b974289a borg rename: expand placeholders, fixes #2386
(cherry picked from commit c7256abd84)
2017-04-07 05:24:19 +02:00
Marian Beermann
949871d463 serve: fix forced command lines containing BORG_ env vars
(cherry picked from commit 88dfb3e9c5)
2017-04-04 18:50:09 +02:00
Thomas Waldmann
c07c911643 fix error msg, it is --keep-within, not --within
(cherry picked from commit 9957282315)
2017-04-03 22:47:09 +02:00
Thomas Waldmann
1e44ea8869 fix borg key/debug/benchmark crashing without subcommand, fixes #2240
(cherry picked from commit a38a7d0293)
2017-04-03 22:42:59 +02:00
enkore
f2b222b2c2 Archive: allocate zeros when needed (#2308)
fixes huge memory usage of mount (8 MiB × number of archives)
(cherry picked from commit 883a7eefb2)
2017-04-03 21:28:23 +02:00
Thomas Waldmann
f1bc2076a7 extract: remove duplicate code
anything at <path> gets nuked already a few lines above, if possible.
2017-04-01 20:14:15 +02:00
Thomas Waldmann
ff4f04e5f1 extract: small bugfix and refactoring for parent dir creation
make_parent(path) helper to reduce code duplication.
also use it for directories although makedirs can also do it.

bugfix: also create parent dir for device files, if needed.

(cherry picked from commit d4e27e2952)
2017-04-01 20:14:15 +02:00
Thomas Waldmann
07bcd29144 clamp (nano)second values to unproblematic range, fixes #2304
filesystem -> clamp -> archive (create)

(cherry picked from commit b7a17a6db7)
2017-03-16 20:54:33 +01:00
enkore
5990b0ad9a Merge pull request #2286 from ThomasWaldmann/no-keep-last
fix error msg, there is no --keep-last in borg 1.0.x, fixes #2282
2017-03-12 11:56:09 +01:00
Thomas Waldmann
a55807e7be fix error msg, there is no --keep-last in borg 1.0.x, fixes #2282 2017-03-10 23:47:26 +01:00
Thomas Waldmann
be1227fd1c borg delete --force --force to delete severely corrupted archives, fixes #1975
(cherry picked from commit 4d81b186ec)
2017-03-10 23:03:25 +01:00
Abdel-Rahman
bfc745237a extract: warning RC for unextracted big extended attributes, followup (#2258)
* Set warning exit code when xattr is too big

* Warnings for more extended attributes errors (ENOTSUP, EACCES)

* Add tests for all xattr warnings

(cherry picked from commit 63b5cbfc99)
2017-03-10 22:44:27 +01:00
Abdel-Rahman
b4c0dcfbdf Add return code functions (#2199)
(cherry picked from commit 4b33c3fe14)
2017-03-10 22:44:27 +01:00
TW
5efda261b3 Fix compression exceptions (#2224)
* trigger bug in --verify-data, see #2221

* raise decompression errors as DecompressionError, fixes #2221

this is a subclass of IntegrityError, so borg check --verify-data works correctly if
the decompressor stumbles over corrupted data before the plaintext gets verified
(in a unencrypted repository, otherwise the MAC check would fail first).

* fixup: fix exception docstring, add placeholder, change wording
2017-03-10 19:06:54 +01:00
Thomas Waldmann
391e302182 Location: accept //servername/share/path 2017-03-10 18:57:36 +01:00
Abogical
4543691c05 Add testsuite to test handling of too big xattr 2017-03-10 18:57:15 +01:00
Abogical
d11137dd37 Print a warning for too big extended attributes 2017-03-10 18:57:15 +01:00
Thomas Waldmann
c96cd1adc5 fix ChunkIndex.__contains__ assertion for big-endian archs
also: add some missing assertion messages

severity:

- no issue on little-endian platforms (== most, including x86/x64)
- harmless even on big-endian as long as refcount is below 0xfffbffff,
  which is very likely always the case in practice anyway.
2017-03-10 18:56:18 +01:00
Marian Beermann
6e27c8b6cf archive check: detect and fix missing all-zero replacement chunks, fixes #2180
# Conflicts:
#	borg/archive.py
2017-03-10 18:54:01 +01:00