1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 01:06:50 +00:00
Commit graph

1694 commits

Author SHA1 Message Date
Thomas Waldmann
d2b7dbc0a8 debugging helper: borg debug-dump-archive-items 2015-11-03 23:42:58 +01:00
TW
15dd64cdaf Merge pull request #369 from ThomasWaldmann/fix-key-check
Fix key check
2015-11-03 20:43:17 +01:00
Thomas Waldmann
12b5d07e55 fix RobustUnpacker, it missed some metadata keys. add check for unknown metadata keys.
not just the new atime and ctime keys were missing, but also bsdflags.
2015-11-03 20:21:52 +01:00
Thomas Waldmann
fa35525b58 create from stdin: also save atime, ctime
cosmetic, just for completeness.
2015-11-03 19:52:49 +01:00
Thomas Waldmann
f28d5d1f96 disk full test: some improvements
- can create 0-byte files now
- frees space early (avoids running out of disk space at repo init time)
- creates multiple reserve files, so we do not only reserve some space,
  but also some inodes
 - only print output if there is an error RC
 - if make_files makes us run out of space, that is not interesting, just start
   a new iteration from scratch
2015-11-03 19:39:05 +01:00
Thomas Waldmann
f804c6fb1c repository check code: added some comments 2015-11-03 15:41:02 +01:00
Thomas Waldmann
98f3b8d937 fix "check" for repos that have incomplete chunks, fixes #364
added try/finally (the code in between was just indented, no
other code changes) to make sure it sets self.index back to None,
even if the code crashes e.g. due to an IntegrityError caused
by an incomplete segment caused by a disk full condition.

also, in prepare_txn, create an empty in-memory index if transaction_id
is None, which is required by the Repository.check code to work correctly.
If the index is not empty there, it will miscalculate segment usage
(self.segments).
2015-11-03 15:30:33 +01:00
TW
1f271821b8 Merge pull request #363 from ThomasWaldmann/corruption-test
add a test to find disk-full issues, #327
2015-11-03 01:06:41 +01:00
Thomas Waldmann
22262e3fb7 add a test to find disk-full issues, #327 2015-11-03 00:41:20 +01:00
Thomas Waldmann
a69f7b0f59 vagrant: use pyinstaller from develop branch, fixes #336
it has some fixes that are not in pyinstaller 3.0 release (and not in master branch).
2015-11-02 21:06:04 +01:00
Thomas Waldmann
bdf7dc65bd docs: add example for rename 2015-11-02 20:53:04 +01:00
Thomas Waldmann
6d5cc06cf6 remove unused imports, add missing imports 2015-11-02 20:36:13 +01:00
Thomas Waldmann
734dae80ef improve chunker params docs, fixes #362 2015-11-02 19:47:09 +01:00
Thomas Waldmann
36cc377329 use default_notty=False for confirmations, fixes #345
this is so that e.g. cron jobs do not hang indefinitely if yes() is called,
but it will just default to "no" if not tty is connected.

if you need to enforce a "yes" answer (which is not recommended for
the security critical questions), you can use the environment:

BORG_CHECK_I_KNOW_WHAT_I_AM_DOING=Y
2015-11-02 01:59:22 +01:00
Thomas Waldmann
e6231896cd emit a deprecation warning for --compression N
deprecating it in the source is not enough, we also need to tell the users to fix their scripts.
2015-11-02 00:14:01 +01:00
TW
6d0570a6f7 Merge pull request #357 from ThomasWaldmann/coverage-fixes
fix .coverragerc omits, fixes #319
2015-11-01 23:40:00 +01:00
Thomas Waldmann
23a3e3b068 do not measure coverage for fuse.py
it's always at 0% although we do have fuse tests. guess one can't measure such code with coverage.py.
2015-11-01 23:22:04 +01:00
Thomas Waldmann
ff66271057 only measure coverage for borgbackup code, not for tests 2015-11-01 23:20:32 +01:00
Thomas Waldmann
35280e9a65 label platform code, exclude freebsd and unknown platform from coverage measurement
this coverage configuration is mostly for travis and there we only can test linux and darwin.
2015-11-01 23:06:52 +01:00
Thomas Waldmann
d7b6cc3527 fix .coverragerc path
as the cwd is in toxworkdir, .coveragerc is in ../
2015-11-01 22:36:18 +01:00
Thomas Waldmann
8493cfb0f1 fix .coverragerc omits
seems like they need a */ prefix

also: exclude everything below support/ - this is 3rd party stuff.
2015-11-01 22:18:47 +01:00
TW
12758f1a19 Merge pull request #354 from ThomasWaldmann/cleanup-confirmations
Cleanup confirmations
2015-11-01 19:44:54 +01:00
Thomas Waldmann
0a6e6cfe2e refactor confirmation code, reduce code duplication, add tests 2015-11-01 19:18:29 +01:00
Thomas Waldmann
36900051c5 move test utilities to testsuite package, add FakeInputs utility 2015-11-01 19:13:45 +01:00
TW
37a02a89ab Merge pull request #352 from ThomasWaldmann/issue-351
Issue 351
2015-11-01 01:12:05 +01:00
Thomas Waldmann
4a1c995244 add --show-rc option enable "terminating with X status, rc N" output, fixes #351
this is needed for tools like borgweb (or in general: when the rc value / exit status should
be logged for later review or directly seen on screen).

this is off by default, so the output is less verbose (and also does not fail tests which
counts lines).
2015-11-01 00:53:55 +01:00
Thomas Waldmann
4bf8c8a6f8 separate parse_args() from run()
parse_args concentrates on only processing arguments, including pre and post processing.
this needs to be called before run(), which is now receiving the return value of parse_args.

this was done so we can have the parsed args outside of the run function, e.g. in main().
2015-11-01 00:40:32 +01:00
Thomas Waldmann
7ea701f6f7 fix test failure for borg.exe
fatal error is rc 2 now (EXIT_ERROR)
2015-11-01 00:01:23 +01:00
TW
f651b014e6 Merge pull request #350 from ThomasWaldmann/fix-307
prettier connection closed message, fixes #307
2015-10-31 23:19:26 +01:00
TW
5f86959762 Merge pull request #349 from ThomasWaldmann/pretty-errors
prettier error messages, fixes #57
2015-10-31 22:44:04 +01:00
TW
39e4f344bd Merge pull request #348 from ThomasWaldmann/warn-slow-msgpack
emit a warning if we have a slow msgpack installed
2015-10-31 22:43:36 +01:00
TW
d41f7d1e09 Merge pull request #344 from rpodgorny/no-rawconfigparser
move away from RawConfigParser to ConfigParser
2015-10-31 22:43:08 +01:00
Thomas Waldmann
1740384763 prettier connection closed message, fixes #307 2015-10-31 22:41:08 +01:00
Thomas Waldmann
762fdaadd8 prettier error messages, fixes #57
subclasses of "Error": do not show traceback
(this is used when a failure is expected and has rather trivial reasons and usually
does not need debugging)

subclasses of "ErrorWithTraceback": show a traceback
(this is for severe and rather unexpected stuff, like consistency / corruption issues
or stuff that might need debugging)

I reviewed all the Error subclasses whether they fit into the one or other class.

Also: fixed docstring typo, docstring formatting
2015-10-31 22:23:32 +01:00
Thomas Waldmann
3490469734 emit a warning if we have a slow msgpack installed
the reason for a slow msgpack can be:
- pip install: missing compiler (gcc)
- pip install: missing compiler parts (e.g. gcc-c++)
- pip install: cached wheel package that was built while the compiler wasn't present
- distribution package: badly built msgpack package
2015-10-31 20:37:21 +01:00
Thomas Waldmann
3c2dee6eb6 vagrant: fix msgpack installation on centos, fixes #342 2015-10-31 19:50:53 +01:00
Thomas Waldmann
44083f7f73 updated CHANGES 2015-10-29 16:22:02 +01:00
Radek Podgorny
5cc25d986a move away from RawConfigParser to ConfigParser
this is a recommended thing since direct use of RawConfigParser
is not deprecated according to python docs.
2015-10-29 02:37:43 +01:00
Thomas Waldmann
5992d4be58 Merge branch 'review-logging-levels' 2015-10-28 02:02:33 +01:00
TW
b4aab655c1 Merge pull request #341 from ThomasWaldmann/python35
also test py35 on travis
2015-10-27 23:25:58 +01:00
Thomas Waldmann
9d0d37fab0 also test py35 on travis 2015-10-27 23:06:32 +01:00
TW
b4535471f6 Merge pull request #340 from ThomasWaldmann/fix-fuse-locking
fuse mount: fix unlocking of repository at umount time, fixes #331
2015-10-27 23:01:05 +01:00
Thomas Waldmann
dd577bf4ac fuse mount: fix unlocking of repository at umount time, fixes #331
there were 2 issues:
lock used another pid and tid than release because daemonize() made it different processes/threads.
solved by just determining PID only once and not using TID any more.

the other issue was that the repo needed and explicit closing.
2015-10-27 22:37:36 +01:00
Thomas Waldmann
b787ac6ea1 docs: remove api docs (too much breakage on rtd) 2015-10-27 20:46:57 +01:00
TW
fe87cb9c9f Merge pull request #335 from ThomasWaldmann/save-atime-ctime
backup atime and ctime additionally to mtime, fixes #317
2015-10-26 23:43:04 +01:00
Thomas Waldmann
92d31be087 atime unit test: test adapts to O_NOATIME support on platform 2015-10-26 23:16:41 +01:00
Thomas Waldmann
3e73998710 atime unit test: do not compare input file's current atime
and explain why (missing O_NOATIME open mode modified the atime at backup time).
2015-10-26 23:08:37 +01:00
Thomas Waldmann
765999195d atime unit test: hardcode "round" timestamps
just to avoid rounding / precision issues with floating point computations on py < 3.3
I used 2 hardcoded "full second" values on the input file and check if they get restored
correctly.
2015-10-26 22:34:08 +01:00
Thomas Waldmann
c492011a92 backup atime and ctime additionally to mtime, fixes #317
restore: mtime and atime
FUSE: support ctime and atime additionally to mtime
2015-10-26 02:07:55 +01:00
Thomas Waldmann
b89b5c2520 Merge branch 'master' of github.com:borgbackup/borg 2015-10-26 01:44:43 +01:00