Ask questionsFeature request: allow fast renaming (for rotating snapshots)

When renaming an archive it takes a few seconds as it seems that borg does some extra things than just changing the name (compacting etc.).

When using a set of rotating snapshots, for example:

create save, delete save10, save9 -> save10, save8 -> save9, ..., save1 -> save2, save -> save1

where -> means renaming, each of the renaming operations does more than renaming and takes quite a lot of time.

Would it be possible to add a --fast option to rename in which onle the name of the snapshot is changed ?

Thank you, best, Carlos PS I know I could purge but I have different sets of rotating snapshosts and there is no way purging allows me to keep the 10 last snapshots of each rotating set.


Answer questions ThomasWaldmann

borg 1.2 will have a separate compactsubcommand, so users can choose when to run this and it won't be run automatically at the end of any repo-writing command. but even with that, each borg command will have some startup overhead for loading repo and chunks index, doing self tests, etc.

for borg 1.1.x you will have to use prune and you must use its --prefix option to work with different backup sets inside one repo. there are also some other options like --keep-lastuseful for your case.

i guess i won't invest time in optimizing borg 1.1.x for fast renames as your use case can be better solved with prune and borg 1.2 / master branch already has the compact_segments tuning.

TW ThomasWaldmann Earth, Solar System, Local Interstellar Cloud, Local Bubble, Orion–Cygnus Arm, Milky Way
Github User Rank List