In the past I’ve used to have gzipped git bundle files for backup. I’ve also used them importing into SCM-Manager. This seems to be somehow broken. When I’m trying to import a plain git bundle file without compression, I’ve got the following error:
Import of repository git/smos
Repository type: git
Imported from: DUMP
Imported by chef (chef)
2023-04-04T13:13:13.773241500Z - import started
2023-04-04T13:13:13.786241200Z - writing temporary dump file
2023-04-04T13:13:13.787240400Z - importing repository data from dump file
2023-04-04T13:13:13.841238900Z - import failed (see next log entry)
Error detected parsing the header
2023-04-04T13:13:13.989242700Z - import failed (see next log entry)
Failed to import from bundle
Anything I’m doing wrong? The bundle was created on Windows on a fresh cloned repository using the following statement:
Okay, our docs say that we don’t support git bundles yet. Our export format matches the expected import format.
The output format of the repository can be changed via the offered options:
Standard: If no options are selected, the repository will be exported in the standard format. Git and Mercurial are exported as Tar archive and Subversion uses the Dump format.
Can you import the repository without git bundles? I think you can simply tar your bare repository. Feel free to export an example repository and check the expected format.
Oh, okay, didn’t know this. I’ve developed backup scripts based on git bundle. Tested during development also the import to SCM-Manager. The backup and also the restore worked very well. Haven’t tested the restore since last year.
Thanks for your suggestions. I’ve tried the following cases:
git clone --mirror, tar it => No success
git clone --bare, tar it => No success
The message “Failed to import from bundle” makes me believing that a git bundle seems to be the right way, but I may be wrong.
I’ve installed the “Repository Mirror Plugin” and cloned a git repo from GitHub and exported it without metadata but zipped.
Then I was successful in importing this export. The result of unzipping/untaring the export confuses me - the result is readable, but at least for me an unknown format. Is there any kind of format description available?