Commit Graph

2255 Commits

Author SHA1 Message Date
Marian Beermann 890e44ef60 RemoteRepository: clean up pipe if remote open() fails 2016-04-04 17:10:14 +02:00
Marian Beermann 425a4d819d Remote: don't print tracebacks for Error exceptions handled downstream
(What we'd really want is to have proper exception transporting over
 the RPC)

Fixes #792
2016-04-04 17:09:52 +02:00
Marian Beermann 8f716d8ca1 If BORG_PASSPHRASE is present but wrong, don't prompt for password, fail instead.
Leaves PassphraseKey alone, since I cannot test it.

Fixes #791
2016-04-03 21:37:15 +02:00
TW e6fff5fe1f Merge pull request #836 from ThomasWaldmann/complete-log-levels
add --warning, --error, --critical for completeness, fixes #826
2016-04-03 20:51:02 +02:00
TW a519333376 add --warning, --error, --critical for completeness, fixes #826
it's not recommended to suppress warnings or errors,
but the user may decide this on his own.

note: --warning is not given to borg serve so a <= 1.0.0 borg
will still work as server. it is not needed as it is the default.
2016-04-03 20:20:48 +02:00
TW 7b6ae60df5 Merge pull request #834 from enkore/issue/826
ArchiveChecker: move "orphaned objects check skipped" to INFO log level
2016-04-03 19:15:30 +02:00
TW fec9228b80 Merge pull request #832 from anarcat/patch-2
add jessie-backports to supported platforms
2016-04-03 18:28:48 +02:00
Marian Beermann d7299c9230 ArchiveChecker: move "orphaned objects check skipped" to INFO log level
Fixes #826
2016-04-03 18:23:40 +02:00
anarcat 287f49503b add jessie-backports to supported platforms
see #105
2016-04-03 12:23:32 -04:00
TW 86361fd75f update CHANGES
the password roundtrip was already in 1.0.0, removed it from 1.0.1 changes.
rephrase / prettify some stuff.
2016-04-03 17:49:37 +02:00
TW fc10ac0ef9 Merge pull request #830 from enkore/feature/1.0ctxmng
Make Repository a context manager, use decorators for wrapping withs
2016-04-03 17:36:38 +02:00
Marian Beermann 83586ae09c Make Repository a context manager, use decorators for wrapping withs
(Remote)Repository.close() is not a public API anymore, but a private
API. It shall not be used from within other classes than Repository
or it's tests. The proper way is to use a context manager now. However,
for RPC/Remote compatibility with Borg 1.0 it is kept and unchanged.

Repositories are not opened by __init__ now anymore, it is done
by binding it to a context manager. (This SHOULD be compatible both ways
with remote, since opening the repo is handled by a RepositoryServer method)

Decorators @with_repository() and @with_archive simplify
context manager handling and remove unnecessary indentation.

Backported to 1.0-maint
2016-04-03 17:14:43 +02:00
TW d6590b4e2d Merge pull request #821 from borgbackup/1.0-maint
merge 1.0-maint
2016-04-01 00:19:01 +02:00
TW 8d9dbc6901 Merge pull request #820 from ipha/master
fix incorrect _ns variables
2016-03-31 23:53:19 +02:00
TW ad57178ad7 Merge pull request #819 from enkore/fix/chunker-io2
Chunker: fix wrong EOF assumption, check for return type
2016-03-31 23:45:47 +02:00
Mitch Bigelow f406bf7879 fix incorrect _ns variables 2016-03-31 17:31:53 -04:00
Marian Beermann 061bf59d5d Chunker: fix wrong EOF assumption[1], check for return type[2]
[1]
This worked incidentally because OSes tend to return at least one page
worth of data when EOF is not reached. Increasing WINDOW_SIZE beyond
the page size might have lead to data loss.

[2]
If read() of the passed Python object returned something not-bytes,
PyBytes_Size returns -1 (ssize_t) which becomes a very larger number for
memcpy()s size_t.
2016-03-31 22:03:17 +02:00
Thomas Waldmann 2f74d2e288 update CHANGES 2016-03-31 21:44:43 +02:00
wormingdead 1cc053bee4 Document logo font. Recreate logo png. Remove GIMP logo file. 2016-03-31 21:37:30 +02:00
Alexander Pyhalov e494d24d6a failing hashindex tests on netbsd, fixes #804 2016-03-31 21:32:27 +02:00
Thomas Waldmann c35dbac44b update CHANGES 2016-03-31 21:28:35 +02:00
TW d56e4c5370 Merge pull request #818 from borgbackup/1.0-maint
merge append-only from 1.0 maint
2016-03-31 20:28:49 +02:00
TW 8cfc930066 Merge pull request #817 from enkore/feature/append-only
Feature append only
2016-03-31 19:57:13 +02:00
Marian Beermann 8f6ce9051b append-only mode: docs reformulated 2016-03-31 18:52:40 +02:00
Marian Beermann effa992d22 append-only mode: use single file for log, disallow check --repair, docs 2016-03-31 18:23:08 +02:00
TW 6841be3684 Merge pull request #789 from enkore/feature-hmac
Replace stdlib hmac, zero-copy decrypt
2016-03-31 18:15:57 +02:00
TW 233e23965d Merge pull request #816 from Ape/pr/sort_diff_output
Add '--sort' option for sorting diff command output
2016-03-31 18:13:00 +02:00
Lauri Niskanen 9d1a30c08b Add '--sort' option for sorting diff command output
Previously, on 'borg diff', the output always had first the modifications, then
additions, and finally removals. Output may be easier to follow if the various
kinds of changes are interleaved. This commit is a simple solution that first
collects the output lines and sorts them by file path before printing. This new
behavior is optional and disabled by default. It can be enabled with '--sort'
command line option.

This option will be especially useful after the planned multi-threading changes
arrive. Multi-threading may shuffle the archive order of files making diff
output hard to follow without sorting.

Resolves #797.
2016-03-31 18:55:02 +03:00
Marian Beermann ffc8cf6c97 Append-only mode for repositories
New repository config item, repository.append_only, causes Borg to never
delete or append to existing data files. Hints and indices are handled
as before, old ones are deleted, because they can get quite large, but
are automatically reconstructed: no need to keep them.

When append_only is activated a file /path/to/repo/transactions/<NUMBER>
will be created for every commit.
Deleting all segments <NUMBER+1> and higher will rollback to that commit.

Note that this only influences Borg behaviour. Since repository config
can't be altered remotely (except for repository.key) this can't be
disabled when accessed remotely over SSH with "borg serve" as the
forced command.

This is only a feature to support the use case, and does not replace
appropriate file system permissions or monitoring.

Resolves #809
2016-03-31 17:29:17 +02:00
TW 2a026bd842 Merge pull request #815 from edgewood/master
Add 'x' status for excluded paths (#814)
2016-03-31 15:50:19 +02:00
Ed Blackman 2ab324c03f Add 'x' status for excluded paths (#814)
Makes it easy to see paths excluded by --exclude* options for testing of
regexes, and for ongoing monitoring that files desired for backup aren't
getting excluded accidentally.
2016-03-30 22:38:31 -04:00
TW 5a0f75df9b Merge pull request #806 from pyhalov/804
failing hashindex tests on netbsd, fixes #804
2016-03-28 01:14:00 +02:00
Alexander Pyhalov a97c9f9e81 failing hashindex tests on netbsd, fixes #804 2016-03-27 17:42:45 +03:00
Marian Beermann c5bd7f2216 Replace stdlib hmac with OpenSSL, zero-copy decrypt
AESKeyBase.decrypt makes less copies of the data, specifically data[41:],
which copies the payload, is gone. This is possible since this commit
makes our lil' crypto API compatible with simple buffers.

In Cython there is a syntax for creating memoryviews from buffer-enabled
objects, however, it doesn't support read-only buffers. ro_buffer gets
this job done, though, and also does the proper type checking
(by PyBUF_SIMPLE).

Note: msgpack doesn't support memoryviews. Otherwise we could avoid
      copying the en/de-crypted output with the final "return out[:ctl]"

This commit leads to a solid 10-15 % increase in performance of hash-lists
and extract.

The hmac_sha256() function releases the GIL.
2016-03-27 01:12:23 +01:00
TW 1787cf1c67 Merge pull request #783 from Ape/pr/improved_diff_format
Improved diff format
2016-03-26 23:06:59 +01:00
Lauri Niskanen d5f045379d Add Lauri Niskanen to AUTHORS 2016-03-26 23:51:45 +02:00
Lauri Niskanen 4eba7d38ea Preserve archive order of added and removed files 2016-03-26 23:51:45 +02:00
Lauri Niskanen 1d3e69e4c7 Improve 'borg diff' output format
The main design goals of the new format:
 - One file takes exactly one line of output
 - The format is easy to read with typical, long list of changes
 - Metadata changes are visible and easy to examine
 - Unuseful information is not shown

Resolves #757.
2016-03-26 23:50:03 +02:00
Lauri Niskanen c405122753 Add option for an explicit sign in sizeof_fmt functions in helpers 2016-03-26 23:49:24 +02:00
TW db171e998e Merge pull request #777 from enkore/feature-ctxmng
Feature ctxmng: Repository context manager
2016-03-26 21:34:06 +01:00
TW 7225def75c Merge pull request #803 from borgbackup/1.0-maint
merge 1.0 maint
2016-03-26 17:51:12 +01:00
TW bf208479d7 Merge pull request #801 from ThomasWaldmann/cosmetic-fix
fix capitalization, add ellipses, change log level to debug for 2 mes…
2016-03-26 17:16:13 +01:00
TW 74f15e239c Merge pull request #800 from ThomasWaldmann/vagrant-xenial
vagrant: add ubuntu/xenial 64bit
2016-03-26 17:15:11 +01:00
Thomas Waldmann 3e120378e0 fix capitalization, add ellipses, change log level to debug for 2 messages, fixes #798 2016-03-26 14:31:54 +01:00
Thomas Waldmann 54b7ac66e8 Merge branch 'lfam-packaged-for-guix' 2016-03-26 14:21:10 +01:00
Thomas Waldmann d6b85a6a3b Merge branch 'packaged-for-guix' of https://github.com/lfam/borg into lfam-packaged-for-guix 2016-03-26 14:20:48 +01:00
Thomas Waldmann cd3c36780a vagrant: add ubuntu/xenial 64bit
this box has still some issues, but hopefully they will be fixed soon.
2016-03-26 14:14:15 +01:00
TW a7063991ca Merge pull request #799 from wormingdead/master
Your project's blurry logo drove me to correct it. I found the font in Google's database.
2016-03-26 12:56:22 +01:00
wormingdead f5ea7f5643 Document logo font. Recreate logo png. Remove GIMP logo file. 2016-03-25 22:43:29 -07:00
TW 9068a40e2e Merge pull request #794 from infectormp/patch-1
Installation: Mention Gentoo package
2016-03-25 13:35:13 +01:00