Commit graph

446 commits

Author SHA1 Message Date
Marian Beermann
e98b5b20df yes(): handle JSON output 2017-03-09 21:36:37 +01:00
Abdel-Rahman
63b5cbfc99 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
2017-03-08 17:13:42 +01:00
enkore
fc41c98a86 Redo key_creator, key_factory, centralise key knowledge (#2272)
* key: put key metadata (name, storage) into key classses

* keymanager: use key-declared storage types
2017-03-08 17:08:54 +01:00
Mark Edgington
e4391dec54 docs: improve --exclude-if-present and --keep-exclude-tags 2017-03-07 22:32:52 -05:00
Abdel-Rahman
4b33c3fe14 Add return code functions (#2199) 2017-03-05 13:33:42 +01:00
TW
89114d4885 Merge pull request #2198 from Abogical/too-big-xattr
Handle big extended attributes. Fixes #2161
2017-03-04 17:54:58 +01:00
Thomas Waldmann
fd0649767a hashindex: rebuild hashtable if we have too little empty buckets, fixes #2246
if there are too many deleted buckets (tombstones), hashtable performance goes down the drain.
in the worst case of 0 empty buckets and lots of tombstones, this results in full table scans for
new / unknown keys.
thus we make sure we always have a good amount of empty buckets.
2017-03-04 03:09:18 +01:00
TW
503e9a27e6 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-04 00:01:02 +01:00
enkore
6468b8a0c2 Merge pull request #2229 from enkore/f/jsonp
JSON progress indicators
2017-03-03 14:39:28 +01:00
Marian Beermann
c50ffc21b0 list: only load cache if needed 2017-03-02 00:24:22 +01:00
Marian Beermann
abb0a20d4f list: files->items, clarifications 2017-03-01 16:58:06 +01:00
Thomas Waldmann
d5707929fd [docs] improve remote-path description
(ported bebehei's 1.0-maint change to master)
2017-03-01 01:53:23 +01:00
TW
0db058345b Merge pull request #2217 from ThomasWaldmann/bench-cmd
borg benchmark crud command
2017-02-28 21:49:04 +01:00
Thomas Waldmann
9f3a970cec borg benchmark crud command, fixes #1788 2017-02-28 20:50:25 +01:00
Alexander 'Leo' Bergolth
5cd424e4be --patterns-from was accessing args.roots instead of args.paths
add a test case that parses a command containing --patterns-from
2017-02-28 14:18:18 +01:00
Marian Beermann
6ee0585b33 extract: fix missing call to ProgressIndicator.finish 2017-02-28 02:04:46 +01:00
Marian Beermann
8e1edaf258 ArchiveFormatter: add "start" key for compatibility with "info" 2017-02-28 01:33:36 +01:00
Marian Beermann
d327109604 json progress: emit info (current $something) 2017-02-28 01:33:36 +01:00
Marian Beermann
fcad0ddab4 pass msgid for common errors 2017-02-28 01:19:20 +01:00
Marian Beermann
9f446aa6d4 pass --log-json to remote
Obviously this means that --log-json with remote repos requires 1.1
on the remote end, but if you don't have that, then random "Remote:"
lines would break stderr anyway.
2017-02-28 01:19:20 +01:00
Marian Beermann
d5515b6952 add msgid to progress output 2017-02-28 01:19:20 +01:00
Marian Beermann
6288c9f751 enhance JSON progress information
separate output types, extra information
2017-02-27 20:30:20 +01:00
enkore
7c9c4b61d7 Merge pull request #2157 from ThomasWaldmann/add-filesize
archived file items: add size metadata
2017-02-27 18:05:43 +01:00
Thomas Waldmann
0721cb1ede files cache: update inode number, fixes #2226 2017-02-27 15:30:55 +01:00
TW
1a67b82726 Merge pull request #2220 from ThomasWaldmann/compression-default-lz4
use lz4 compression by default, fixes #2179
2017-02-27 00:31:43 +01:00
enkore
46787a90a0 Merge pull request #2204 from ThomasWaldmann/test-delete-force
Test delete --force
2017-02-26 21:23:23 +01:00
kmq
757921dbdc
Document relative path usage #1868 2017-02-26 20:33:15 +02:00
Thomas Waldmann
2ad5f903fe add test for borg delete --force 2017-02-26 18:49:10 +01:00
TW
9bc825a27a Merge pull request #2184 from ThomasWaldmann/zap
borg delete --force --force to delete severely corrupted archives, fixes #1975
2017-02-26 18:44:31 +01:00
Thomas Waldmann
92e5db0c2e use lz4 compression by default, fixes #2179
not for create_src_archive() though as this triggers a bug that has to get fixed outside this PR first.
2017-02-26 18:38:29 +01:00
enkore
ecd13f11b0 Merge pull request #2218 from kmq/master
document snapshot usage #2178
2017-02-26 17:34:15 +01:00
Marian Beermann
70c11976bc Add --log-json option for structured logging output 2017-02-26 16:25:58 +01:00
kmq
f7d28e76a0
document snapshot usage #2178 2017-02-26 13:47:26 +02:00
enkore
0f9b7a270d Merge pull request #2203 from enkore/f/jsono
JSON output for major commands
2017-02-25 23:05:35 +01:00
enkore
5c46136433 Merge pull request #2210 from enkore/f/rxtx
RemoteRepository: account rx/tx bytes
2017-02-25 22:41:27 +01:00
Thomas Waldmann
c8ec698d73 Location: accept //servername/share/path 2017-02-24 04:22:12 +01:00
Thomas Waldmann
4d81b186ec borg delete --force --force to delete severely corrupted archives, fixes #1975 2017-02-24 01:28:42 +01:00
Abogical
e487b8404c Add testsuite to test handling of too big xattr 2017-02-23 23:42:56 +02:00
Abogical
4c9bc96fb7 Print a warning for too big extended attributes 2017-02-23 23:42:56 +02:00
Thomas Waldmann
7da0a9c982 borg extract: check file size consistency 2017-02-23 21:46:15 +01:00
Thomas Waldmann
adc4da280d borg check: check file size consistency 2017-02-23 21:46:15 +01:00
Marian Beermann
4f1db82f6d info <archive>: use Archive.info() for both JSON and human display 2017-02-23 21:39:56 +01:00
Thomas Waldmann
50068c596d rename Item.file_size -> get_size
file_size is misleading here because one thinks of on-disk file size,
but for compressed=True, there is no such on-disk file.
2017-02-23 21:27:05 +01:00
Thomas Waldmann
97bb1b7d9a deduplicate / refactor item (c)size code 2017-02-23 21:27:05 +01:00
Thomas Waldmann
0021052dbd reduce code duplication 2017-02-23 21:24:37 +01:00
Thomas Waldmann
ae6742fb34 fuse: use precomputed size from Item 2017-02-23 21:24:37 +01:00
Thomas Waldmann
fe8e14cb2c fuse: get rid of chunk accounting
the chunk accounting code tried to reflect repo space usage via the st_blocks of the files.
so, a specific chunk that was shared between multiple files [inodes] was only accounted for one specific file.
thus, the overall "du" of everything in the fuse mounted repo was maybe correctly reflecting the repo space usage,
but the decision which file has the chunk (the space) was kind of arbitrary and not really useful.

otoh, a simple fuse getattr() was rather expensive due to this as it needed to iterate over the chunks list
to compute the st_blocks value. also it needed quite some memory for the accounting.

thus, st_blocks is now just ceil(size / blocksize).

also: fixed bug that st_blocks was a floating point value previously.

also: preparing for further optimization of size computation (see next cs)
2017-02-23 21:24:37 +01:00
Thomas Waldmann
a52b54dc3c archived file items: add size metadata
if an item has a chunk list, pre-compute the total size and store it into "size" metadata entry.

this speeds up access to item size (e.g. for regular files) and could also be used to verify the validity of the chunks list.

note about hardlinks: size is only stored for hardlink masters (only they have an own chunk list)
2017-02-23 21:24:37 +01:00
Marian Beermann
f3c7e7cd36 RemoteRepository: account rx/tx bytes 2017-02-23 16:50:52 +01:00
Marian Beermann
8cdf192511 list: add "name" key for consistency with info cmd 2017-02-23 15:23:27 +01:00