borg icon indicating copy to clipboard operation
borg copied to clipboard

Question: Can you backup and restore borg's cache?

Open mooreye opened this issue 3 years ago • 1 comments

Have you checked borgbackup docs, FAQ, and open Github issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

QUESTION

Question

Is it safe (by safe I mean data corruption) to backup ~/.cache/borg/ to a separate location using rsync so that when I restore from borg's repo to another machine, I can place the cache in the ~/.cache/borg/ directory on that machine and not have to generate the cache first time it backups from that machine?

mooreye avatar Aug 07 '22 19:08 mooreye

It somehow sounds that is more risky and more effort than just letting it recreate the cache if needed?

ThomasWaldmann avatar Aug 09 '22 16:08 ThomasWaldmann

So this is unsafe? Should I close the issue?

mooreye avatar Oct 01 '22 14:10 mooreye

Yes, guess that letting a cache recreate after deletion (or moving a setup to somewhere else) is the usual procedure and should always work.

Doing stuff like copying caches around is error prone (not just due to borg internals, but also to simple mistakes like accidentally messing up permissions while copying) and could lead to strange issues in some circumstances - even if it could be done safely when considering. So why risk it.

ThomasWaldmann avatar Oct 01 '22 16:10 ThomasWaldmann