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

1209 commits

Author SHA1 Message Date
Antoine Beaupré
2d4b735fed remove unintended changes 2015-10-08 16:38:53 -04:00
Antoine Beaupré
27be46a5ba tweak some levels 2015-10-08 16:31:22 -04:00
Antoine Beaupré
d9e05946ac document logger module 2015-10-06 13:03:49 -04:00
Antoine Beaupré
42cc17caed use new logger object initialisation code 2015-10-06 12:57:27 -04:00
Antoine Beaupré
26561a7766 factor out logger object initialisation 2015-10-06 12:57:27 -04:00
Antoine Beaupré
2d0dae4e8b move logging setup to logger module 2015-10-06 12:57:26 -04:00
Antoine Beaupré
97189dd25b add missing sys import, fixing build 2015-10-03 15:08:55 -04:00
Antoine Beaupré
e414203ce2 convert upgrade code to logger as well 2015-10-03 14:24:48 -04:00
Antoine Beaupré
24413136ee Merge remote-tracking branch 'origin/master' into logging-refactor
Conflicts:
	borg/archiver.py
2015-10-03 14:23:53 -04:00
TW
4474db31d4 Merge pull request #242 from ThomasWaldmann/delete-cache-only
implement borg delete --cache-only repo, attic #123
2015-10-03 19:46:51 +02:00
Thomas Waldmann
51dc66d05f implement borg delete --cache-only repo, attic #123
it deletes just the local cache for the given repository, not the repo itself.
2015-10-03 19:29:45 +02:00
TW
adac324b6c Merge pull request #240 from ThomasWaldmann/cache-config-check
fix multiple issues with the cache config version check, fixes #234
2015-10-03 19:19:22 +02:00
TW
23bfe4d1bc Merge pull request #238 from ThomasWaldmann/index-archive-optional
temporary hack to avoid using lots of disk space for chunks.archive.d
2015-10-03 19:12:52 +02:00
TW
1207e1a4fa Merge pull request #231 from anarcat/attic-converter
attic to borg one time converter
2015-10-03 19:05:39 +02:00
Antoine Beaupré
5409cbaa67 also copy files cache verbatim
it seems the file cache does *not* have the ATTIC magic header (nor
does it have one in borg), so we don't need to edit the file - we just
copy it like a regular file.

while i'm here, simplify the cache conversion loop: it's no use
splitting the copy and the edition since the latter is so fast, just
do everything in one loop, which makes it much easier to read.
2015-10-03 12:56:03 -04:00
Antoine Beaupré
fded2219a8 mention borg delete borg
this makes it clear how to start from scratch, in case the chunk cache
was failed to be copied and so on.
2015-10-03 12:46:23 -04:00
Antoine Beaupré
c91c5d0029 rename convert command to upgrade
convert is too generic for the Attic conversion: we may have other
converters, from other, more foreign systems that will require
different options and different upgrade mechanisms that convert could
never cover appropriately. we are more likely to use an approach
similar to "git fast-import" instead here, and have the conversion
tools be external tool that feed standard data into borg during
conversion.

upgrade seems like a more natural fit: Attic could be considered like
a pre-historic version of Borg that requires invasive changes for borg
to be able to use the repository. we may require such changes in the
future of borg as well: if we make backwards-incompatible changes to
the repository layout or data format, it is possible that we require
such changes to be performed on the repository before it is usable
again. instead of scattering those conversions all over the code, we
should simply have assertions that check the layout is correct and
point the user to upgrade if it is not.

upgrade should eventually automatically detect the repository format
or version and perform appropriate conversions. Attic is only the
first one. we still need to implement an adequate API for
auto-detection and upgrade, only the seeds of that are present for now.

of course, changes to the upgrade command should be thoroughly
documented in the release notes and an eventual upgrade manual.
2015-10-03 12:36:52 -04:00
Antoine Beaupré
48b7c8cea3 avoid checking for non-existent files
if there's no attic cache, it's no use checking for individual files

this also makes the code a little clearer

also added comments
2015-10-03 11:52:12 -04:00
Antoine Beaupré
690541264e style fixes (pep8, append, file builtin) 2015-10-03 11:49:01 -04:00
Antoine Beaupré
3773681f00 rewire cache copy mechanisms
we separate the conversion and the copy in order to be able to copy
arbitrary files from attic without converting them. this allows us to
copy the config file cleanly without attempting to rewrite its magic
number
2015-10-03 11:07:38 -04:00
Antoine Beaupré
2c66e7c233 make percentage a real percentage 2015-10-03 10:49:29 -04:00
Thomas Waldmann
bf3cf21ac5 docs: add warning about prune 2015-10-03 14:12:16 +02:00
Thomas Waldmann
2c13027750 apt-get install: add -y 2015-10-03 03:21:56 +02:00
Thomas Waldmann
3143839f6b use Debian 7 (wheezy) VMs to do the linux binary builds 2015-10-03 03:10:12 +02:00
Antoine Beaupré
f25888b27a restore box removed by mistake 2015-10-02 16:04:35 -04:00
Antoine Beaupré
35aaeef8bd remove spurious output 2015-10-02 16:00:42 -04:00
Antoine Beaupré
8193c414a9 add and use string representation of archive for stats 2015-10-02 15:56:21 -04:00
Antoine Beaupré
e5a0936a05 add formatters for Cache and Statistics objects
this greatly simplifies the display of those objects, as the
__format__() parameter allows for arbitrary display of the internal
fields of both objects

this will allow us to display those summaries without having to pass a
label to the string representation. we can also print the objects
directly without formatting at all.
2015-10-02 15:55:14 -04:00
Thomas Waldmann
893242ead4 fix multiple issues with the cache config version check, fixes #234
- issue #234: handle exception when config file is empty is really not a borg cache config
- there was a unused %s in the Exception string
- error msg was wrong when version check failed - this IS a borg cache, but not of expected version
2015-10-02 18:11:10 +02:00
Antoine Beaupré
b09cdb4a63 don't add module name on standard messages
too much clutter
2015-10-02 11:22:38 -04:00
Antoine Beaupré
2f78b8ad41 remove stray comment 2015-10-02 11:16:28 -04:00
Antoine Beaupré
1819adaf59 log level tweaking: stats should not be a warning
we should find other ways of forcing that to be shown, it seems
2015-10-02 11:16:21 -04:00
Antoine Beaupré
ca6c52610f restore some print statements
the heuristics i used are the following:

 1. if we are prompting the use, use print on stderr (input() may
    produce some stuff on stdout, but it's outside the scope of this
    patch). we do not want those prompts to end up on the standard
    output in case we are piping stuff around

 2. if the command is primarily producing output for the user on the
    console (`list`, `info`, `help`), we simply print on the default
    file descriptor.

 3. everywhere else, we use the logging module with varying levels of
    verbosity, as appropriate.
2015-10-02 11:13:01 -04:00
Antoine Beaupré
c9b11316ab use a module-specific logger instead of global one
that way we have one logger per module, and we can pick and choose
which module we want verbose, for example
2015-10-02 11:05:44 -04:00
Thomas Waldmann
8978515991 temporary hack to avoid using lots of disk space for chunks.archive.d 2015-10-02 16:56:31 +02:00
Thomas Waldmann
aef71ac640 Merge branch 'master' of github.com:borgbackup/borg 2015-10-02 16:25:57 +02:00
Antoine Beaupré
ea5d00436c also document the cache locations 2015-10-02 10:12:13 -04:00
Antoine Beaupré
ad85f64842 whitespace 2015-10-02 10:10:50 -04:00
Antoine Beaupré
69040588cd update docs to reflect that cache is converted 2015-10-02 10:10:43 -04:00
Antoine Beaupré
d4d1b414b5 remove needless autouse 2015-10-02 09:44:53 -04:00
Antoine Beaupré
41e9942efe follow naming of tested module 2015-10-02 09:43:51 -04:00
Antoine Beaupré
081b91bea0 remove needless paren 2015-10-02 09:43:10 -04:00
Antoine Beaupré
3e7fa0d633 also copy the cache config file to workaround #234 2015-10-01 16:41:17 -04:00
Antoine Beaupré
8022e563a9 don't clobber existing borg cache 2015-10-01 16:27:19 -04:00
Antoine Beaupré
55f79b4999 complete cache conversion code
we need to create the borg cache directory

dry run was ignored, fixed.

process cache before segment, because we want to do the faster stuff first
2015-10-01 16:24:28 -04:00
Antoine Beaupré
28a033d1d3 remove debug output that clobbers segment spinner 2015-10-01 16:03:52 -04:00
Antoine Beaupré
4f9a411ad8 remove unneeded fixture decorator 2015-10-01 16:01:17 -04:00
Antoine Beaupré
022de5be47 untested file/chunks cache conversion
i couldn't figure out how to generate a cache set directly, Archiver is a pain...
2015-10-01 16:01:01 -04:00
Antoine Beaupré
7c32f555ac repository index conversion 2015-10-01 15:43:16 -04:00
Antoine Beaupré
a7902e5657 cosmetic: show 100% when done, not n-1/n% 2015-10-01 14:29:09 -04:00