Comments (6)
Can we efficiently access random items in metadata[b'items']
? The code accessing that so far is strictly linear access.
If we could, a directory tree index could be added separately, only containing indexes into the items. This could speed up all content-reading actions significantly if only a subset is accessed.
Edit: Ah, no, msgpack only has a streaming unpacker it seems. But maybe we can seek before feeding data to unpacker and this way emulate random access?
from borg.
basically to make this safe, there is need for dependency tracking, so metadata of a directory will only get written after its content is done
this could be tracked as tree of contents that constructs as unpacking is done, and deconstructs as items are written,
every time a treee turns empty, we can write directory metadata
the pipeline can be created in a way that a tree cannot turn empty unless all its content is processed
from borg.
That would make it unnecessary to make another pass over all dirs in borg extract, but doesn't speed up "random access" to directories / files for listing/extracting subtrees.
Concrete example: listing all files in /home takes a minute or so, listing a subtree with a few dozen files still takes ~20 s (because iter_items / unpack_many needs to read, unpack, decode, filter all items)
from borg.
well, a backup tool has to make some trade-offs, - since the metadata is supposed to be sorted, i believe that binary search is reasonably fast for that kind of access
from borg.
If I understand things correctly accessing items non-linearly is not trivial to do.
from borg.
(I'm not saying that this is an actual problem that needs solving, I think it's "fast enough", at least for me)
from borg.
Related Issues (20)
- borg2: Creating archive fails at specific archive name HOT 3
- disk is full: `_get_default_tempdir` raises `FileNotFoundError` No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/kmille'] HOT 7
- run in venv w/ root rights HOT 3
- As of 1.2.0, the ssh relative path hack "/./" works for most actions but not "borg init" HOT 4
- Please add a way to keep backups independently of pruning retention policy HOT 2
- ConnectionResetError: [Errno 104] Connection reset by peer HOT 3
- `borgfs` in Standalone Binary Installation Docs HOT 2
- Can't build borg on arm64 (armbian 22.04LTS) HOT 20
- Use multithreaded zstd compression HOT 9
- Security Feature: Error if local / repository nonce are not in agreement -- improve encryption trust HOT 1
- Are backup archive names encrypted? Cannot find answer in docs. HOT 1
- Backups much slower (5 mins compared to 0.3 secs) than reported "Duration" -- any way to speed it up? HOT 6
- Possible bug in pruning logic with keep-weekly and keep-monthly HOT 7
- netbsd9 vagrant box: broken libxxhash.pc HOT 2
- locking.py seems multiprocess-safe but not thread-safe HOT 3
- `borg check` hangs after errors HOT 5
- pytest startdir: py.path.local argument is deprecated
- Getting "Data integrity error: Invalid segment entry size 0" on fresh repos HOT 9
- Breaking change between b7 and b8 for encrypted repos HOT 5
- --pattern having different outcome in crontab HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from borg.