1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-11 06:33:39 +00:00
Commit graph

8880 commits

Author SHA1 Message Date
TW
4ed03c17e6
Merge pull request #8536 from ThomasWaldmann/vagrant-debian32
vagrant: add bookworm32 box for 32bit platform testing
2024-11-12 01:01:22 +01:00
TW
d266b2fd2d
Merge pull request #8531 from ThomasWaldmann/chunkindex
chunk index cache: use cache/chunks.<HASH>, see #8503
2024-11-11 23:02:50 +01:00
Thomas Waldmann
6a1aa438f8
vagrant: add bookworm32 box for 32bit platform testing 2024-11-10 02:11:24 +01:00
Thomas Waldmann
56493fc62b
chunk index cache: fix "upgrade" code
nice try, but due to other changes after b13, the cache is invalid anyway.
2024-11-08 22:10:39 +01:00
Thomas Waldmann
43a27f294d
caching a merged chunk index: only delete what we merged 2024-11-08 22:03:32 +01:00
Thomas Waldmann
00f8cdc9a7
when building the chunk index, merge all we have in the cache 2024-11-08 22:03:29 +01:00
Thomas Waldmann
4a6fcc26d7
use stable chunkindex list order 2024-11-08 22:03:28 +01:00
Thomas Waldmann
d4310dd4cf
chunk index cache: use cache/chunks.<HASH>, see #8503
- doesn't need a separate file for the hash
- we can later write multiple partial chunkindexes to the cache

also:

add upgrade code that renames the cache from previous borg versions.
2024-11-08 22:03:26 +01:00
TW
35c83dfd66
Merge pull request #8525 from PhrozenByte/docs-undelete
Update docs to better incorporate new undelete command
2024-11-08 20:43:34 +01:00
Daniel Rudolf
38ba3d8c4d Update docs to better incorporate new undelete command
Follow-up to #8515

Refer to https://github.com/borgbackup/borg/pull/8515#pullrequestreview-2417746853 for details.
2024-11-08 01:50:45 +01:00
TW
e9ace2df78
Merge pull request #8530 from ThomasWaldmann/mount-fixes
mount: fix check_pending_archive to give correct root dir, fixes #8528
2024-11-07 23:22:43 +01:00
Thomas Waldmann
f515160bb0
mount: fix check_pending_archive to give correct root dir, fixes #8528
for archive series (duplicate names!), it is not just
the archive name, but NAME-ARCHIVEID.
2024-11-07 21:15:58 +01:00
TW
2dffc60507
Merge pull request #8515 from ThomasWaldmann/soft-delete
soft delete / undelete
2024-11-06 15:44:50 +01:00
Thomas Waldmann
142a739105
check: improve docs 2024-11-05 22:15:16 +01:00
Thomas Waldmann
7cd048f53a
compact: explain more 2024-11-05 21:25:24 +01:00
Thomas Waldmann
72b1a8ea04
delete/prune: add hint about undelete 2024-11-05 21:02:52 +01:00
Thomas Waldmann
a48a8d2bea
check --find-lost-archives (was: --undelete-archives)
Consider soft-deleted archives/ directory entries, but only create a new
archives/ directory entry if:
- there is no entry for that archive ID
- there is no soft-deleted entry for that archive ID either

Support running with or without --repair.

Without --repair, it can be used to detect such inconsistencies and return with rc != 0.

--repository-only contradicts --find-lost-archives.
2024-11-05 21:02:50 +01:00
Thomas Waldmann
c35cbc9028
rebuild_archives_directory: accelerate by only reading metadata
We are only interested in archive metadata objects here, thus for most repo objects
it is enough to read the repoobj's metadata and determine the object's type.

Only if it is the right type of object, we need to read the full object (metadata
and data).
2024-11-05 21:02:49 +01:00
Thomas Waldmann
299c05287f
compact: remove soft-deleted archives/* entries, docs 2024-11-05 21:02:24 +01:00
Thomas Waldmann
9fabc19e6b
undelete: undelete soft-deleted archives, fixes #8500 2024-11-05 20:56:32 +01:00
Thomas Waldmann
7ed8ed56d2
repo-list: --deleted lists deleted archives 2024-11-05 20:03:07 +01:00
Thomas Waldmann
088d59d814
repository: store_list: add deleted param 2024-11-05 20:03:06 +01:00
Thomas Waldmann
c8bce0329d
archive deletion: use store soft-deletion
This keeps the object, just renames it to "*.del".
2024-11-05 20:03:04 +01:00
Thomas Waldmann
179aadc5cc
repository: add store_move for soft-delete 2024-11-05 20:02:57 +01:00
TW
c4635690e3
Merge pull request #8523 from ThomasWaldmann/zsh-completions-borg2
shell completions: adapt zsh for borg 2.0.0b13
2024-11-05 18:31:44 +01:00
Thomas Waldmann
fdc882230e
shell completions: adapt zsh for borg 2.0.0b13
I am not familiar with zsh completions, so I did only the easy stuff.

A lot of the more complex stuff is likely still broken, PR's welcome!
2024-11-05 17:16:38 +01:00
TW
d1d438ba57
Merge pull request #8520 from ThomasWaldmann/vagrant-improvements
vagrant improvements
2024-11-03 21:14:53 +01:00
Thomas Waldmann
32a8c9a3c9
vagrant: fix pythons on freebsd14
- install with sqlite3
- make sure there is python3/pip3/virtualenv command
2024-11-03 19:28:15 +01:00
Thomas Waldmann
a0f56bfddd
vagrant: simplify openindiana box setup 2024-11-03 15:05:07 +01:00
TW
4a88e16790
Merge pull request #8519 from ThomasWaldmann/revert-8510
improve borg mount docs
2024-11-03 14:32:29 +01:00
Thomas Waldmann
5fc72080bb
mount docs: apply jdchristensen's suggestion, better phrasing. 2024-11-03 14:04:45 +01:00
Thomas Waldmann
c49a4e20eb
Revert "docs: Fix grammar in borg mount docs #8510"
This reverts commit d3f3082bf4.

Comment by jdchristensen:

I agree that "wipe clean" is correct grammar, but it doesn't match the situation in "unmount cleanly".
The change in this patch is definitely wrong.
Putting it another way, one would never say that we "clean unmount a filesystem".
We say that we "cleanly unmount a filesystem", or in other words, that it "unmounts cleanly".

But the original text is slightly awkward, so I would propose: "When running in the foreground,
^C/SIGINT cleanly unmounts the filesystem, but other signals or crashes do not."

(Not that this guarantees anything, but I'm a native speaker.)
2024-11-03 14:00:00 +01:00
TW
bef9595463
Merge pull request #8516 from ThomasWaldmann/fix-compress-entry
compress_entry: fix assertion failure
2024-11-03 00:16:42 +01:00
Thomas Waldmann
0545b6a2eb
compress_entry: fix assertion failure
if the size is not known yet in the chunks index, we must update the value there.
2024-11-02 19:21:08 +01:00
TW
59459af88b
Merge pull request #8513 from ThomasWaldmann/refcount-becomes-flags
ChunkIndexEntry.refcount -> .flags
2024-11-02 02:33:50 +01:00
Thomas Waldmann
8a13cf2c4d
make mypy happy 2024-11-02 00:06:09 +01:00
Thomas Waldmann
2ab3c163ce
invalidate existing cache by incrementing the ChunkIndex seed
we changed the semantics (and name) of the first tuple element:
refcount -> flags

thus, better invalidate existing cache.
2024-11-01 23:57:38 +01:00
Thomas Waldmann
ba3e701730
ChunkIndex.add: remove useless refs parameter 2024-11-01 23:53:01 +01:00
Thomas Waldmann
94effcd782
ChunkIndex: .refcount -> .flags
We gave up refcounting quite a while ago and are only interested
in whether a chunk is used (referenced) or not (orphan).

So, let's keep that uint32_t value, but use it for bit flags, so
we could use it to efficiently remember other chunk-related stuff also.
2024-11-01 23:52:59 +01:00
TW
8bdf6b7ffb
Merge pull request #8512 from ThomasWaldmann/use-refcount-less
seen_chunk: do not use .refcount
2024-11-01 22:20:18 +01:00
TW
3c38b2fa66
Merge pull request #8511 from ThomasWaldmann/files-cache-using-borghash
reduce memory consumption of files cache, fixes #5756
2024-11-01 21:06:49 +01:00
Thomas Waldmann
de1b7e0581
seen_chunk: do not use .refcount
If we have an entry for a chunk id in the ChunkIndex,
it means that this chunk exists in the repository.

The code was a bit over-complicated and used entry.refcount
only to detect whether .get(id, default) actually got something
from the ChunkIndex or used the provided default value.

The code does the same now, but in a simpler way.
Additionally, it checks for size consistency if a size is
provided by the caller and a size is already present in
the entry.
2024-11-01 21:05:49 +01:00
Thomas Waldmann
26bb7825b1
minor cleanup 2024-11-01 17:48:15 +01:00
Thomas Waldmann
e053307523
reduce memory consumption of files cache, fixes #5756
- refactor packing/unpacking of fc entries into separate functions
- instead of a chunks list entry being a tuple of 256bit id [bytes] and 32bit size [int],
  only store a stable 32bit index into kv array of ChunkIndex (where we also have id and
  size [and refcount]).
- only done in memory, the on-disk format has (id, size) tuples.

memory consumption (N = entry.chunks list element count, X = overhead for rest of entry):
- previously:
  - packed = packb(dict(..., chunks=[(id1, size1), (id2, size2), ...]))
  - packed size ~= X + N * (1 + (34 + 5)) Bytes
- now:
  - packed = packb(dict(..., chunks=[ix1, ix2, ...]))
  - packed size ~= X + N * 5 Bytes
2024-11-01 17:47:43 +01:00
TW
b553452911
Merge pull request #8484 from mrichtarsky/docs
Docs: Remove --bypass-lock, small changes regarding compression
2024-11-01 12:26:06 +01:00
TW
168d34664e
Merge pull request #8483 from mrichtarsky/faq
docs/FAQ: Clean up entries regarding SSH settings
2024-11-01 12:16:37 +01:00
TW
038f6da988
Merge pull request #8510 from fantasya-pbem/master
docs: Fix grammar in borg mount docs
2024-11-01 12:06:07 +01:00
Thalian
d3f3082bf4 docs: Fix grammar in borg mount docs #8510
"clean" as adverb does not have suffix -ly.
Source: https://dict.leo.org/grammatik/englisch/adjv_usage_flat.php?lang=de#id=5.3.1.b
2024-11-01 07:57:10 +01:00
Martin Richtarsky
b913d9dd1a docs/FAQ: Clean up entries regarding SSH settings
Link to recommended ones
2024-11-01 07:43:47 +01:00
TW
5da1ff166f
Merge pull request #8505 from ThomasWaldmann/rel200b13
release 2.0.0b13
2024-10-31 23:54:09 +01:00