Commit graph

26 commits

Author SHA1 Message Date
Thomas Waldmann
6ee42216bf avoid stale filehandle issues, fixes #3265 2019-03-19 18:51:23 +01:00
Thomas Waldmann
1efec3ced1 add comment about unused recreate_* members in ArchiveItem 2019-03-19 18:45:19 +01:00
Thomas Waldmann
8ad90c1242 remove ARCHIVE_KEYS duplication
also: get key set in sync, obviously we have "recreate_partial_chunks"
in ArchiveItem still.
2019-03-19 18:36:18 +01:00
Thomas Waldmann
1db42a58a5 make sure all segment file offsets fit into uint32, fixes #3592
C code and the repo index use uint32 type for segment file offsets,
so when opening a repo and the config max_segment_size is too big,
fail early.

Also disallow setting a too big value via "borg config".

(cherry picked from commit 0e0e6da585)
2018-03-17 21:34:42 +01:00
Sam H
e51cf43142 include item birthtime in archive (where available) (#3313)
include item birthtime in archive, fixes #3272

* use `safe_ns` when reading birthtime into attributes
* proper order for `birthtime` in `ITEM_KEYS` list
* use `bigint` wrapper for consistency
* Add tests to verify that birthtime is normally preserved, but not preserved when `--nobirthtime` is passed to `borg create`.
2017-11-13 14:18:59 -05:00
Thomas Waldmann
eab9f5a07b implement files cache mode control, fixes #911
You can now control the files cache mode using this option:

--files-cache={ctime,mtime,size,inode,rechunk,disabled}*

(only some combinations are supported)

Previously, only these modes were supported:
- mtime,size,inode (default of borg < 1.1.0rc4)
- mtime,size (by using --ignore-inode)
- disabled (by using --no-files-cache)

Now, you additionally get:
- ctime alternatively to mtime (more safe), e.g.:
  ctime,size,inode (this is the new default of borg >= 1.1.0rc4)
- rechunk (consider all files as changed, rechunk them)

Deprecated:
- --ignore-inodes (use modes without "inode")
- --no-files-cache (use "disabled" mode)

The tests needed some changes:
- previously, we use os.utime() to set a files mtime (atime) to specific
  values, but that does not work for ctime.
- now use time.sleep() to create the "latest file" that usually does
  not end up in the files cache (see FAQ)

(cherry picked from commit 5e2de8ba67)
2017-10-01 01:27:18 +02:00
Thomas Waldmann
764324304d move ISO_FORMAT to constants module
also: add ISO_FORMAT_NO_USECS
(cherry picked from commit 1cb158a4b5)
2017-09-07 14:56:27 +02:00
Thomas Waldmann
5cc2b900ee constants: avoid comparing constants
lgtm:
Comparison of constants is always constant, but is harder to read than
a simple constant.
2017-07-23 02:00:55 +02:00
Thomas Waldmann
89f3cab6cd move get_limited_unpacker to helpers
also: move some constants to borg.constants
2017-06-25 23:36:28 +02:00
Thomas Waldmann
6c2c51939d Manifest: use limited unpacker 2017-06-25 23:36:28 +02:00
Andrea Gelmini
e4247cc0d2 Fix typos 2017-06-09 16:49:30 +02:00
Thomas Waldmann
ffcf6b76b6 DEFAULT_SEGMENTS_PER_DIR = 1000
prettier increments for the directory names.
2017-06-03 21:54:41 +02:00
Marian Beermann
8e24ddae06 increase DEFAULT_SEGMENTS_PER_DIR to 2000 2017-05-22 12:31:52 +02:00
Thomas Waldmann
a52b54dc3c archived file items: add size metadata
if an item has a chunk list, pre-compute the total size and store it into "size" metadata entry.

this speeds up access to item size (e.g. for regular files) and could also be used to verify the validity of the chunks list.

note about hardlinks: size is only stored for hardlink masters (only they have an own chunk list)
2017-02-23 21:24:37 +01:00
Marian Beermann
b0e4f13fba set MAX_DATA_SIZE = 20971479 bytes in solid stone 2017-02-23 00:34:40 +01:00
Marian Beermann
69f7810658 info: show utilization of maximum archive size
See #1452

This is 100 % accurate.

Also increases maximum data size by ~41 bytes. Not 100 % side-effect free;
if you manage to exactly land in that area then older Borg would not read
it. OTOH it gives us a nice round number there.
2017-02-22 23:47:21 +01:00
Marian Beermann
bd4a0fe23b
Clarify cache/repository README file 2016-11-11 21:24:17 +01:00
Thomas Waldmann
c8922c8b3d use ArchiveItem 2016-08-15 01:11:33 +02:00
Thomas Waldmann
8be6761c26 Merge commit 'feb7e2517ef7ec07cc638953a86c726aada7d37e' 2016-08-14 15:05:11 +02:00
Thomas Waldmann
04ad1d1b0b use "part file", "part", etc. consistently
use .borg_part_N as filename to avoid collisions
2016-07-28 19:39:29 +02:00
Thomas Waldmann
dd5f957e6f in-file checkpoints, fixes #1198, fixes #1093
also: unify code for stdin and on-disk file processing
2016-07-28 19:39:29 +02:00
Thomas Waldmann
fe627246e4 Merge branch '1.0-maint' 2016-07-08 12:13:52 +02:00
Thomas Waldmann
9a64835b4d Merge branch '1.0-maint'
Also: add missing keys to ARCHIVE_KEYS set.
2016-06-13 00:14:08 +02:00
Thomas Waldmann
60da32123a refactor to use Item class, fixes #1071 2016-06-04 17:24:55 +02:00
Thomas Waldmann
3ce35f6843 Merge branch 'master' into move-to-src 2016-05-21 19:06:01 +02:00
Thomas Waldmann
d1ea925a5b move borg package to src/ 2016-05-05 20:19:50 +02:00
Renamed from borg/constants.py (Browse further)