Is it possible to “fork” a borg repository? #8558
-
I want to add a new backup medium and want to preserve the backup history of my other backup media (at least of one of them) also on the new medium. How can I get the history into a new repository other than fuse-mounting the “old” borg repository and creating a backup of it in the “new” borg repository, as this method has several drawbacks:
Is there a method that I missed? Btw, the repository size is approx. 8 TB such that just copying the old repoo and starting a new one with the new backup is a no-go as it would double the needed space on the medium, which it does not have. #6286 (comment) looks like that might be possible by copying and then changing metadata, but I want to be sure to not break my existing backups. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
To seamlessly transition your backup history to a new medium using Borg, you might want to explore the borg transfer feature, which is designed to move archives between repositories smoothly. This method ensures that all metadata remains intact, avoiding the pitfalls of duplicating data as would happen with simple file system tools like cp or dd. Start by setting up your new repository and then run borg transfer to bring the archives over from the old location. It’s a good idea to give this process a trial run on a smaller set of data first to make sure everything functions as expected. Before diving in, make sure you have a backup of your essential data just in case. And of course, the Borg documentation is there to guide you through the finer details if needed. |
Beta Was this translation helpful? Give feedback.
-
Borg2 will support transfers In borg1 cloning the repo requires some hands on approach |
Beta Was this translation helpful? Give feedback.
-
In borg1, there is no perfect way to clone (duplicate) a repo (so you could use 2 perfect repos afterwards independently):
The first 2 methods are ok IF you don't need all metadata. File names, simple stat (user, group, mode) and file content will be ok. |
Beta Was this translation helpful? Give feedback.
Changing the repo id avoids the cache issues, but not the crypto issues.
But if you don't fear a targetted high-profile attack, it might be an option / a risk you could take.