Commit graph

940 commits

Author SHA1 Message Date
Thomas Waldmann
6996fa6dc0 creating a new segment: use "xb" mode, fixes #2099
"ab" seems to make no sense here (if there is already a (crap, but non-empty) segment file,
we would write a MAGIC right into the middle of the resulting file) and cause #2099.
2017-01-24 23:06:40 +01:00
TW
ca0c1dab11 Merge pull request #2015 from ThomasWaldmann/fix-location-regex
fix bad parsing of wrong syntax
2017-01-21 05:46:58 +01:00
Thomas Waldmann
c0fb8da595 fix xattr test race condition, fixes #2047 2017-01-14 23:19:40 +01:00
enkore
82fd84e865 Merge pull request #2035 from ThomasWaldmann/docs-backup-from-stdin
borg create: document how to backup stdin, fixes #2013
2017-01-14 00:27:18 +01:00
enkore
a488d39245 Merge pull request #2034 from ThomasWaldmann/api-version-number-spacing
API_VERSION: use numberspaces, fixes #2023
2017-01-14 00:26:47 +01:00
Thomas Waldmann
022c1288e7 borg create: document how to backup stdin, fixes #2013 2017-01-13 21:49:06 +01:00
Thomas Waldmann
1c854b9f60 API_VERSION: use numberspaces, fixes #2023
like '<numberspace>_<version>', e.g. '1.0_01' for version 01 (used in 1.0 maintenance branch).

this avoids overlap and accidental collisions between different release branches.
2017-01-13 21:24:17 +01:00
Thomas Waldmann
941b8d7778 borg serve: fix transmission data loss of pipe writes, fixes #1268
This problem was found on cygwin/windows due to its small pipe buffer size of 64kiB.

Due to that, bigger (like >64kiB) writes are always only partially done and os.write() returns
the amount of data that was actually sent. the code previously did not use that return value
and assumed that always all is sent, which led to a loss of the remainder of transmission data
and usually some "unexpected RPC data format" error on the client side.

Neither Linux nor *BSD ever do partial writes on blocking pipes, unless interrupted by a
signal, in which case serve() would terminate.
2017-01-13 20:40:40 +01:00
Marian Beermann
3c0a903e8a upgrade: fix incorrect title levels 2017-01-12 14:30:23 +01:00
Marian Beermann
2d2bff9bf6 remote: include unknown data in error message
this makes it far, far easier to diagnose issues like an account being
locked:

Got unexpected RPC data format from server:
This account is currently not available.
2017-01-12 03:18:35 +01:00
Marian Beermann
b6fa8629db remote: log SSH command line at debug level 2017-01-12 02:39:56 +01:00
TW
b206aa771c Merge pull request #2016 from ThomasWaldmann/fix-typos
fix typos
2017-01-12 02:27:13 +01:00
Thomas Waldmann
01090d2d40 fix typos
taken from debian package, thanks to danny edel and lintian for finding these.
2017-01-12 02:25:41 +01:00
enkore
53aaee3519 Merge pull request #2000 from enkore/issue/1997
check: fail if single archive does not exist
2017-01-12 02:08:38 +01:00
Marian Beermann
fe6b03a72d check: print non-exit-code warning if --last or --prefix aren't fulfilled 2017-01-12 02:04:44 +01:00
Thomas Waldmann
1667926c96 fix bad parsing of wrong syntax
this was like whack-a-mole: fix one regex -> another issue pops up
2017-01-12 01:01:24 +01:00
Thomas Waldmann
2938a5f6fb work around spurious log level related test fail when using pytest-xdist 2017-01-06 05:48:50 +01:00
Thomas Waldmann
a1d223cec0 always setup module level "logger" in the same way
this is a cleanup change, found this while trying to find out why
borg_cmd spuriously does not have INFO loglevel when testing with
pytest-xdist.

the cleanup did NOT help with this, but is at least a cleanup.
2017-01-06 05:48:50 +01:00
Thomas Waldmann
5ed6d21302 parallel testing: fix issue related to non-reproducible set / dict order 2017-01-06 05:48:50 +01:00
Marian Beermann
320a56144f helpers.Buffer: raise OSError subclass if too much memory is allocd 2017-01-04 19:28:05 +01:00
Marian Beermann
be8e0c89b3 check: fail if single archive does not exist 2017-01-04 19:25:03 +01:00
Marian Beermann
4b9a9f9b5e change-passphrase: print key location 2017-01-03 17:16:28 +01:00
Marian Beermann
7519bf8100 fix change-passphrase crashing if repository is not encrypted 2017-01-03 17:15:59 +01:00
Marian Beermann
6a5b3018c1 fix upgrade --tam crashing if repository is not encrypted 2017-01-03 17:15:32 +01:00
Marian Beermann
3e04fa972a xattr: only skip file on BufferTooSmallError
redefine __str__ to get a proper error message, not ''
2017-01-03 14:25:55 +01:00
Marian Beermann
85e79f96a1 xattr: ignore empty names returned by llistxattr(2) et al 2017-01-03 12:47:42 +01:00
Marian Beermann
c2c31aa13a enable faulthandler 2016-12-26 15:29:30 +01:00
Marian Beermann
0ff76bdc9d dump a trace on SIGUSR2 2016-12-26 15:29:22 +01:00
Marian Beermann
4d6141a607 upgrade: --disable-tam 2016-12-19 04:01:32 +01:00
Marian Beermann
ec4f42c9f8 init: explain manifest auth compatibility 2016-12-19 04:01:27 +01:00
Marian Beermann
f2f50efc28 check: handle duplicate archive items neatly
Signed-off-by: Thomas Waldmann <tw@waldmann-edv.de>
2016-12-17 20:06:41 +01:00
Marian Beermann
28ad779a6f Add tertiary authentication for metadata (TAM)
Signed-off-by: Thomas Waldmann <tw@waldmann-edv.de>
2016-12-17 20:06:41 +01:00
Marian Beermann
e28b470cfb Fix subsubparsers for Python <3.4.3
This works around http://bugs.python.org/issue9351

Since Debian and Ubuntu ship 3.4.2 and 3.4.0 respectively.
2016-12-17 18:00:03 +01:00
enkore
49c05719d8 Merge pull request #1941 from enkore/issue/1936
Fix some clock problems
2016-12-17 13:20:56 +01:00
Marian Beermann
baa8baafdb create: fix duration if --timestamp is given 2016-12-17 12:55:16 +01:00
Marian Beermann
f5d6093ccc fix checkpoints when clock jumps 2016-12-17 11:58:26 +01:00
Marian Beermann
a8d921a54c base archive timestamps on end time
The assumption is that if the clock jumps during the Borg run that it
was jump-corrected and is now correct, while the start timestamp would
be wrong.
2016-12-17 11:58:26 +01:00
Marian Beermann
2dc558a02e fix create progress not updating if clock jumps 2016-12-17 11:58:25 +01:00
Marian Beermann
420c984f05 fix wrong duration if clock jumps during create 2016-12-17 11:58:25 +01:00
Thomas Waldmann
61370082d6 catch errno.ENOSYS for mknod (win 10 lxsys)
mknod raises this when running as non-root under Windows 10's Linux Subsystem.
2016-12-17 00:37:00 +01:00
Thomas Waldmann
5a40870416 add a borg debug/key dummy command, fixes #1932
the problem was that there neither was a do_debug implementation for the case
someone just enters "borg debug", nor did the parser inherit from common_parser
(so accessing .umask triggered an exception before setup_logging() was called,
which triggered another exception when log output should have been emitted).

same for do_key ("borg key").

added a generic handler that just prints the subcommand help.
2016-12-14 01:57:48 +01:00
Thomas Waldmann
292ff42655 refactor common regex part into optional_user_re 2016-12-13 22:47:12 +01:00
Thomas Waldmann
335d599db4 fix location parser for archives with @ char, add test, fixes #1930
we must exclude colon and slash chars from the username, otherwise the term for the user part
will match everything up to a @ char in the archive name.

a slash can't be in a username as the home directory would contain a illegal slash (slash is path sep),

a colon likely also should not be in a username because chown user:group ... syntax.
2016-12-09 03:37:13 +01:00
Marian Beermann
146d586b3b check: skip corrupted chunks during manifest rebuild 2016-11-30 01:43:01 +01:00
Marian Beermann
71775bac97
check: rebuild manifest if it's corrupted 2016-11-30 01:06:23 +01:00
Thomas Waldmann
989b2286ff fix TypeError in errorhandler, fixes #1903 2016-11-30 00:37:30 +01:00
TW
b25de0ab38 Merge pull request #1895 from ThomasWaldmann/fix-1894
fix traceback in Error handler if id is None, fixes #1894
2016-11-29 19:26:17 +01:00
Thomas Waldmann
cd50e286f7 fix traceback in Error handler if id is None, fixes #1894 2016-11-29 18:27:20 +01:00
Thomas Waldmann
9e760a69a2 test_get_(cache|keys)_dir: clean env state, fixes #1897
make sure the BORG_(CACHE|KEYS)_DIR env var is not set initially.
2016-11-29 14:08:58 +01:00
Thomas Waldmann
9451ab6534 implement noatime / noctime, fixes #1853 2016-11-26 21:24:07 +01:00