Commit graph

578 commits

Author SHA1 Message Date
Thomas Waldmann
e072a52b6c fix _open_rb noatime handling, fixes #657
(not tested by me for the #657 scenario, but at least all our unit tests, including the atime test, worked)
2016-02-18 23:01:55 +01:00
Thomas Waldmann
44c8a4af80 fix pep8 failures 2016-02-17 01:05:04 +01:00
Thomas Waldmann
ecdbfcbea2 Merge https://github.com/Nikratio/borg into fuse-compat-fixes 2016-02-17 00:56:19 +01:00
Nikolaus Rath
dbec05ab73 Make python-llfuse 0.42 compatible.
--HG--
extra : amend_source : 6004af01c4ee6f7ddf6f4138bfc9bbdf2a785eb2
2016-02-16 10:28:16 -08:00
Thomas Waldmann
824ba53d0c borg create --stats: show timestamps in localtime, use same labels/formatting as borg info, fixes #651
"borg info" also shows these timestamps in localtime.

 Note: in the archive, the timestamps are stored as UTC.
2016-02-08 20:17:35 +01:00
Thomas Waldmann
5ffb0fd7cd borg upgrade: add to docs that only LOCAL repos are supported 2016-02-07 21:08:20 +01:00
Thomas Waldmann
409c06c621 moved TODO to issue #645 on github 2016-02-07 21:05:12 +01:00
Thomas Waldmann
316f5a345f docs: borg upgrade also handles borg 0.xx -> 1.0 2016-02-07 19:23:06 +01:00
TW
04bf8d8bf4 Merge pull request #639 from ThomasWaldmann/fix-missing-time_end
fix missing time_end metadata in old archives, fix updating end time
2016-02-07 03:04:06 +01:00
Thomas Waldmann
73e15ac4a3 fix missing time_end metadata in old archives, fix updating end time 2016-02-07 02:35:31 +01:00
Thomas Waldmann
67544275fa show cwd, pid, sys.argv, ssh original command below tracebacks, fixes #637 2016-02-07 02:16:48 +01:00
TW
39c3906238 Merge pull request #634 from ThomasWaldmann/create-starttime-duration
Create starttime duration
2016-02-05 17:04:38 +01:00
Thomas Waldmann
a9f523e5ce archive metadata: store backup END time into 'time_end', display it in "borg info", fixes #627
... except if a timestamp is given via cli, then store that time into 'time_end'
2016-02-05 02:02:04 +01:00
Thomas Waldmann
38d2237dad archive metadata: store backup START time into 'time'
except if a timestamp is given via cli, then store that time into 'time'
2016-02-05 01:53:58 +01:00
Thomas Waldmann
a078d730e1 archive creation start/end timestamp: use utc
the timestamp given via cli is already expected to be utc.

the timestamp which is automatically created when no cli timestamp is given is also utc.

thus, also use utc for .start and .end.
2016-02-05 01:53:58 +01:00
Thomas Waldmann
4843719f72 Cache: fix exception handling in __init__, release lock, fixes #610 2016-02-04 23:19:35 +01:00
Thomas Waldmann
4b339f5d69 cosmetic source cleanup (flake8) 2016-01-30 21:32:45 +01:00
TW
49cf25fce7 Merge pull request #615 from ThomasWaldmann/fix-trailing-slashes
use os.path.normpath on repository paths, fixes #606
2016-01-30 20:07:57 +01:00
TW
9797ab0130 Merge pull request #612 from ThomasWaldmann/fix-544
borg serve: overwrite client's --restrict-to-path with forced command's …
2016-01-30 20:04:09 +01:00
TW
5d93b6cda9 Merge pull request #613 from ThomasWaldmann/xdg-base-dir-keys
use xdg base dir for keys
2016-01-30 20:02:38 +01:00
Thomas Waldmann
8ec62d5e2e use os.path.normpath on repository paths, fixes #606
this does NOT fix absolute vs. relative path usage,
but as this also deals with remote paths, this can't be done in general.
2016-01-30 00:39:25 +01:00
Thomas Waldmann
d6b43a7346 Merge branch 'master' of github.com:borgbackup/borg 2016-01-30 00:01:44 +01:00
Thomas Waldmann
7773e632db fix some minor cosmetic code/docs issues 2016-01-30 00:01:13 +01:00
Thomas Waldmann
12fe47fcd2 implement --short for borg list REPO, fixes #611 2016-01-29 01:50:51 +01:00
Thomas Waldmann
695dc68479 slightly rephrase prune help 2016-01-29 01:40:29 +01:00
Thomas Waldmann
e7add135a2 add upgrader which moves the keys to new location 2016-01-29 01:23:24 +01:00
Thomas Waldmann
e06b7162c2 update docs / docstring about new key location 2016-01-28 23:15:49 +01:00
Thomas Waldmann
b8d954e60a use XDG_CONFIG_HOME for borg keys instead of ~/.borg, fixes #515 2016-01-28 22:26:58 +01:00
Thomas Waldmann
7ea2404048 borg serve: overwrite client's --restrict-to-path with forced command's option value, fixes #544
we also make sure the client is not cheating, like giving another subcommand or his own --restrict-to-path.
2016-01-28 21:59:24 +01:00
Thomas Waldmann
e7c2189a3f implement --list for borg extract
before, borg extract always emitted the full file list at info log level.
now, you need to give --list to get the full file list (consistent with borg create --list).

this is currently only useful if you also use other output-generating options,
e.g. --show-rc - you can now leave away --list to only get that other output.

later, if extract gets more output-generating options, --list will get more useful.
2016-01-28 20:25:55 +01:00
Christoph Trassl
3061b3048c Reformat commands list. 2016-01-25 18:45:32 +01:00
Thomas Waldmann
3476fffe7d remove deprecated "--compression <number>"
use --compression zlib,<number> instead
in case of 0, you could also use --compression none
2016-01-24 16:04:00 +01:00
Thomas Waldmann
ad31fcd7c0 remove deprecated "--hourly/daily/weekly/monthly/yearly"
use --keep-hourly/daily/weekly/monthly/yearly instead

note: kept the code and test, we might have deprecated option in future, too
2016-01-24 16:04:00 +01:00
Thomas Waldmann
079646ee4c remove deprecated "--do-not-cross-mountpoints"
use --one-file-system instead
2016-01-24 16:04:00 +01:00
Thomas Waldmann
e1515ee251 remove deprecated "borg verify"
use borg extract --dry-run ...
2016-01-24 16:04:00 +01:00
Thomas Waldmann
815d2e23ce remove support for --encryption=passphrase, clean up 2016-01-24 16:04:00 +01:00
Thomas Waldmann
2f9b643edb migrate-to-repokey command, dispatch passphrase type to repokey handler
every chunk has the encryption key type as first byte and we do not want to rewrite the whole repo
to change the passphrase type to repokey type. thus we simply dispatch this type to repokey
handler.
if there is a repokey that contains the same secrets as they were derived from the passphrase, it will just work.
if there is none yet, one needs to run migrate-to-repokey command to create it.
2016-01-24 16:04:00 +01:00
Thomas Waldmann
b2dedee3c8 refactor yes(), cleanup env var semantics, fixes #355
refactorings:

- introduced concept of default answer:

if the answer string is in the defaultish sequence, the return value of yes() will be the default.
e.g. if just pressing <enter> when asked on the console or if an empty string or "default" is
in the environment variable for overriding.

if an environment var has an invalid value and no retries are enabled: return default
if retries are enabled, next retry won't use the env var again, but either ask via input().

- simplify:

only one default - this should be a SAFE default as it is used in some special conditions
like EOF or invalid input with retries disallowed.

no isatty() magic, the "yes" shell command exists, so we could receive input even if it is not from a tty.

- clean:

separate retry flag from retry_msg
2016-01-24 16:04:00 +01:00
Thomas Waldmann
6d615ec30a change encryption to be on by default (repokey mode)
it's 2015, let's be safe-by-default and unsafe-as-option.

also: show default mode in builtin help
2016-01-24 15:44:09 +01:00
Thomas Waldmann
169634f2ca change the builtin default for --chunker-params, create 2MiB chunks, fixes #343
one of the biggest issues with borg < 1.0 was that it had a default target chunk
size of 64kiB, thus it created a lot of chunks, a huge chunk management overhead
(high RAM and disk usage).
2016-01-24 15:44:09 +01:00
Thomas Waldmann
5607e5aefe use os.urandom instead of own cython openssl RAND_bytes wrapper, fixes #493 2016-01-24 15:40:04 +01:00
Thomas Waldmann
3ade3d8a41 use hashlib.pbkdf2_hmac from py stdlib instead of own openssl wrapper
this is available in python 3.4+.

note:
before removing the pbkdf tests, i ran them with the pbkdf from stdlib to make sure it gives same result.
long term testing of this now belongs into stdlib tests, not into borg.
2016-01-24 15:40:04 +01:00
Thomas Waldmann
2cc0225527 use hmac.compare_digest instead of == operator
this is available in python 3.3+
2016-01-24 15:40:04 +01:00
Thomas Waldmann
9fa18c9ee9 use stat.filemode instead of homegrown code 2016-01-24 15:40:04 +01:00
Thomas Waldmann
7c8bfe6681 __file__ is now always an absolute path (3.4) 2016-01-24 15:36:04 +01:00
Thomas Waldmann
0be62d4233 stuff found on "Porting to Python 3.3" 2016-01-24 15:36:04 +01:00
Thomas Waldmann
8e13d315bb use PyMemoryView_FromMemory (py 3.3+) 2016-01-24 15:36:04 +01:00
Thomas Waldmann
ef00f5d12d we always have shutil.get_terminal_size on py 3.3+ 2016-01-24 15:36:04 +01:00
Thomas Waldmann
fc326df600 a2b_base64 now also accepts ascii-only str objects 2016-01-24 15:36:04 +01:00
Thomas Waldmann
fc52101d46 suppress unneeded exception context (PEP 409) 2016-01-24 15:36:04 +01:00