Commit Graph

120 Commits

Author SHA1 Message Date
Thomas Waldmann cb5c9b63b3 fork: s/attic/borg/g, fix URLs, add new section to AUTHORS
use borg instead attic except at the places where it was used:
- as toplevel package name, directory name, file name
- to refer to original attic

remove sphinx upload make command, will be replaced by github.io site later

remove references to binary downloads and linux packages for now

remove some software name references, fix grammar

use borgbackup rather than borg-backup (or borg) in URLs,
less name collision issues, better search results, no validity issues with "-"
2015-05-13 15:02:33 +02:00
Thomas Waldmann f9d90482c4 merged master 2015-05-10 16:36:10 +02:00
Jonas Borgström a24d0f4cba Fix typo preventing the security confirmation prompt from working
Closes #303
2015-05-08 17:41:50 +02:00
Thomas Waldmann ca385e5e7a Merge branch 'sparse_files' into merge 2015-04-27 00:48:28 +02:00
Thomas Waldmann 5fcaac1b6f do not test for sparse file on Mac OS X 2015-04-27 00:48:09 +02:00
Thomas Waldmann 354b3d34e3 Merge branch 'master' into merge 2015-04-21 21:02:42 +02:00
Jonas Borgström af9f1c24c4 Fix parsing of iso8601 timestamps with zero microseconds
Closes #282
2015-04-19 22:42:52 +02:00
Thomas Waldmann 99d15157d2 PR #284 updated - Merge branch 'sparse_files' into merge 2015-04-18 01:16:26 +02:00
Thomas Waldmann ee80db4eb2 add commandline argument --sparse
default is to not create sparse files.

if you give --sparse, it will create a hole in the sparse output file when a all-zero chunk is extracted.
2015-04-17 22:28:40 +02:00
Thomas Waldmann b6ed1c742b PR #284 - Merge branch 'sparse_files' into merge 2015-04-15 16:43:07 +02:00
Thomas Waldmann a2bf2aea22 simple sparse file support, made chunk buffer size flexible
Implemented sparse file support to remove this blocker for people backing up lots of
huge sparse files (like VM images). Attic could not support this use case yet as it would
have restored all files to their fully expanded size, possibly running out of disk space if
the total expanded size would be bigger than the available space.

Please note that this is a very simple implementation of sparse file support - at backup time,
it does not do anything special (it just reads all these zero bytes, chunks, compresses and
encrypts them as usual). At restore time, it detects chunks that are completely filled with zeros
and does a seek on the output file rather than a normal data write, so it creates a hole in
a sparse file. The chunk size for these all-zero chunks is currently 10MiB, so it'll create holes
of multiples of that size (depends also a bit on fs block size, alignment, previously written data).

Special cases like sparse files starting and/or ending with a hole are supported.

Please note that it will currently always create sparse files at restore time if it detects all-zero
chunks.

Also improved:
I needed a constant for the max. chunk size, so I introduced CHUNK_MAX (see also
existing CHUNK_MIN) for the maximum chunk size (which is the same as the chunk
buffer size).

Attic still always uses 10MiB chunk buffer size now, but it could be changed now more easily.
2015-04-15 16:29:18 +02:00
Thomas Waldmann 2f71b39866 PR #283 - Merge branch 'fix-missing-microseconds' of https://github.com/camh-/attic into merge 2015-04-15 03:06:50 +02:00
Thomas Waldmann 3a382e9b46 Merge branch 'master' into merge 2015-04-15 02:41:55 +02:00
Jonas Borgström 20026e58aa Fix incorrect behaviour with two character directory names.
Independetely found and fixed by both Thomas Waldemann and
Cam Hutchison. Closes #265 and #268.
2015-04-13 22:44:14 +02:00
Jonas Borgström 7198929bae cache: Warn user before accessing relocated repositories
This also closes #225
2015-04-13 22:42:32 +02:00
Cam Hutchison 0295ef8563 archive: Add testcases for microsecond handling.
datetime.isoformat() has different output depending on whether
microseconds are zero or not. Add test cases to ensure we handle both
cases correctly in an archive.
2015-04-13 18:00:46 +10:00
Thomas Waldmann 233d1f7272 Merge security fix from master. Merge branch 'master' into merge 2015-04-07 18:05:36 +02:00
Jonas Borgström 78f9ad1fab Require approval before accessing previously unknown unencrypted repositories
Closes #271
2015-04-06 23:07:10 +02:00
Thomas Waldmann dc58cf9b35 PR #254 - Merge branch 'tests_32bit_platform' into merge 2015-03-26 01:36:43 +01:00
Thomas Waldmann 8b2b91fb0c Fix test setup for 32bit platforms, partial fix for #196 2015-03-26 01:23:25 +01:00
Thomas Waldmann 3d2a3d11af PR #251 - Merge branch 'rename_archive' into merge 2015-03-24 07:19:01 +01:00
Thomas Waldmann 9f6840dddb implement attic rename repo::oldname newname
I extracted the inner part of Archive.load into a new _load_meta method
that does not modify self and does not decode, so I could simply reuse it.
2015-03-24 07:11:00 +01:00
Thomas Waldmann b7cefacb69 Merge branch 'python_cleanup' into merge
Conflicts:
	attic/archiver.py
	attic/remote.py
2015-03-18 00:23:41 +01:00
Thomas Waldmann 4ef6125f45 cleanup pep8 issues found by pycharm 2015-03-17 23:47:21 +01:00
Thomas Waldmann 3a33d57c7d triple-double-quotes for docstrings 2015-03-17 23:23:56 +01:00
Thomas Waldmann dee9869a03 use "with" with open() 2015-03-17 23:09:14 +01:00
Thomas Waldmann fec5572836 no Class(object) in py3 2015-03-17 23:03:36 +01:00
Thomas Waldmann 2f5e5e01ea PR #235 - Merge branch 'fix_xattr' into merge 2015-03-15 00:22:01 +01:00
Thomas Waldmann 6116fa72b2 give specific path to xattr.is_enabled(), disable symlink setattr call that always fails 2015-03-15 00:20:50 +01:00
Thomas Waldmann 0d2cd28c19 PR #214 - Merge branch 'crypto_cleanup' of https://github.com/thomaswaldmann/attic into merge 2015-03-06 23:50:15 +01:00
Thomas Waldmann fbaa505191 PR #206 - Merge branch 'fixes' of https://github.com/thomaswaldmann/attic into merge 2015-03-06 23:18:08 +01:00
Thomas Waldmann 8c4d290a93 PR #173 - Merge branch 'rpc-whitelist' of https://github.com/dnnr/attic into merge 2015-03-06 22:55:53 +01:00
Thomas Waldmann 6c7c2e2e40 cleanup crypto.pyx, make it easier to adapt to other modes
There were some small issues:

 a) it never called EVP_EncryptFinal_ex.
For CTR mode, this had no visible consequences as EVP_EncryptUpdate already yielded all ciphertext.
For cleanliness and to have correctness even in other modes, the missing call was added.

b) decrypt = encrypt hack
This is a nice hack to abbreviate, but it only works for modes without padding and without authentication.
For cleanliness and to have correctness even in other modes, the missing usage of the decrypt api was added.

c) outl == inl assumption
Again, True for CTR mode, but not for padding or authenticating modes.
Fixed so it computes the ciphertext / plaintext length based on api return values.

Other changes:
As encrypt and decrypt API calls are different even for initialization/reset, added a is_encrypt flag.

Defensive output buffer allocation. Added the length of one extra AES block (16bytes) so it would
work even with padding modes. 16bytes are needed because a full block of padding might get
added when the plaintext was a multiple of aes block size.

These changes are based on some experimental code I did for aes-cbc and aes-gcm.
While we likely won't ever want aes-cbc in attic (maybe gcm though?), I think it is cleaner
to not make too many mode specific assumptions and hacks, but just use the API as it
was meant to be used.
2015-03-03 19:19:28 +01:00
Thomas Waldmann db7ce095d2 fix typos / spelling 2015-02-28 03:43:08 +01:00
Thomas Waldmann 8ffd4c4926 convert docstrings to triple-double-quoted 2015-02-28 03:24:30 +01:00
Thomas Waldmann a8ce0b8b8a remove unused imports 2015-02-28 03:09:01 +01:00
Daniel Danner 046b196bab Only allow whitelisted RPC calls in server mode
Without this check, the client is able to call any method of
RepositoryServer and Repository, potentially circumventing
restrict_to_paths or even run arbitrary code.
2015-01-11 14:06:59 +01:00
Yuri D'Elia 15c8a6323f Normalize source/exclude paths before matching
This normalizes the file names in the dot directory when specified explicitly,
along with exclude/include patterns.

This fixes several mismatches when including relative paths that involve the
current directory.
2014-12-14 22:03:49 +01:00
Jonas Borgström 18641ae687 xattr: Fix issue with empty (0 bytes) xattr values.
Closes #106
2014-12-14 14:28:33 +01:00
Jonas Borgström 678fdd1d42 Fix "Number of files" output for attic info.
Closes #124
2014-10-27 22:00:56 +01:00
Jonas Borgström 5a69f58823 Introduce a separate exception for missing repository objects 2014-10-09 20:41:47 +02:00
Jonas Borgström 21e03af56b Fix minor location parser bug.
Make sure the entire input is parsed.
2014-08-08 23:34:27 +02:00
Jonas Borgström 9f64e39d9f Reuse chunker buffer between files. 2014-08-03 15:04:41 +02:00
Jonas Borgström 193fb1fcd5 Added support for stripping leading path segments
closes #95
2014-08-02 22:15:21 +02:00
Jonas Borgström 8f4e0f7506 acl: Added workaround for old Linux systems
Really old Linux systems do not have extended_file_no_follow()
2014-08-01 15:50:18 +02:00
Jonas Borgström 2f72b9f960 HashIndex: Switch to a non-mmap based implementation
This eliminates unnecessary IO on low memory systems
2014-07-10 15:32:29 +02:00
Jonas Borgström 95162ce1f8 buzhash: One more test case
Test with more than 31 bytes to make sure our BARREL_SHIFT macro
works correctly.
2014-06-05 15:11:46 +02:00
Jonas Borgström 64cd6632a1 Avoid deadlock problems
Explicitly use write locks, instead of read locks (that are later
upgraded) unless we know we will never modify the repository
2014-05-31 15:39:51 +02:00
Jonas Borgström 3ab53b776d Fix crash on extreme mtime timestamps (year 2400+)
Closes #81
2014-05-18 18:28:26 +02:00
Jonas Borgström dd5c0aa0e3 acl: make darwin acl code numeric_owner aware 2014-05-03 23:22:55 +02:00