I am currently running a Bitbucket Server instance and I'm in the process of migrating it to the cloud.
The repo has steadily grown over the last few years and is now ~2.5Gb in size, so this seems like a good time to switch to LFS.
Unfortunately, the larger files in the repo are required and I'd rather not lose the history.
From what I've read so far, the best way to convert to LFS is to use BFG, so my main question is, what is the best order to do things in?
From the moment I start the process until the moment it is complete, the programmers aren't going to be able to access the repo and they'll have to check-out the new repo when it's all done, so I'm aiming for the safest option with the least down-time. I'm thinking this will be me working after everybody has committed all their changes and signed off for the day.
One side note - I ran a test import/convert (using option 1) and the result was that the repo still claimed to be taking up a ton of space and I also needed a ton of storage. I've seen a few posts mention that I may need to contact Atlassian support about running a garbage collection to clear this up.
I look forward to hearing your suggestions/comments/ideas/feedback.
I'm afraid that the importer in Bitbucket Cloud does not import LFS objects.
My suggestion would be the following:
You can double check whether the LFS objects have been pushed if you go to Repository settings (in Bitbucket website) > Git LFS.
I suggest running also the following command inside the converted repo, after you use BFG and prior to pushing it
git reflog expire --expire=now --all && git gc --prune=now --aggressive
and then you can check the size of the local converted repo with
git count-objects -Hv
The sum of the fields size-pack and size in the output will give you the size of the git repo. If this differs from the size you see in the remote, you can open a ticket with the support team to run a git gc on the repo.
If you have any questions, please feel free to let me know!
Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events