Use Git LFS with Bitbucket Cloud
Asked by REKHA.DHARWAL:

I have few questions related to using Git LFS with Bitbucket Cloud:

1. Where is the LFS store located? If large files are actually stored on a remote server where is the remote server located? Is it with Atlassian Bitbucket Cloud or third party?

2. Do large files from LFS have the same level of security as regular files?

3. what is the option for backup and archive of large files when using LFS

4. Is Git LFS is free or any additional charges?


Answers:
author: Ben
body: Hey Rekha,

Welcome to the Bitbucket Cloud Community!

To answer your questions:

1) Large files with GIT LFS are stored externally using Amazon's Simple Storage Service (Amazon S3)

2) Correct, LFS will have the same level of security as regular files - no one will be able to access these files unless they have the necessary permission on the cloud workspace to do so  

3) Can you please clarify what exactly is meant by this question?

4) For Free Users, there is a 1GB limit for GIT LFS - Standard receives 5GB - Premium receives 10GB. Additional GIT LFS storage is charged at an extra $10 per month per 100GB:  
<https://www.atlassian.com/software/bitbucket/pricing>  

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: REKHA.DHARWAL
body: Hey Ben,

Thanks for the response.

By this: 3. what is the option for backup and archive of large files when using LFS

I meant when the repositories are archived and backed up how the large files are archived/backed up? As given on the limitations article <https://support.atlassian.com/bitbucket-cloud/docs/current-limitations-for-git-lfs-with-bitbucket/> it says repository archives do not include the LFS files.

So, what are the options to do backup and archive of LFS files.


author: Piotr Biegun _Gitprotect_io_
body: Hi Rekha,  

for backup of code repositories, metadata and LFS files you could use the existing app from Atlassian Marketplace: [https://marketplace.atlassian.com/apps/1225728/gitprotect-io-backup-for-bitbucket?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1225728/gitprotect-io-backup-for-bitbucket?hosting=cloud&tab=overview).


author: REKHA.DHARWAL
body: Thanks Piotr, GitProtect looks like a third party vendor app and need additional cost for licensing.


author: Piotr Biegun _Gitprotect_io_
body: Yes, that is true, but it also solves problems with backups. Looking into recent Atlassian issues with restoring Jira Accounts I think having 3rd party solution is getting even more justified.


author: Ben
body: Hey [@REKHA.DHARWAL](/t5/user/viewprofilepage/user-id/4865844),

The article you have referenced simply means that you cannot download LFS files directly from the repository source in the UI. GIT LFS is still backed up as is your regular repository in the cloud.

As long as GIT LFS is installed locally in your working directory via the .gitconfiguration, performing a mirror clone will grab the GIT LFS files as well as the regular files/metadata as it is an exact copy of the repo.

To be sure, however, you can perform a mirror clone, then fetch all the GIT LFS files manually with the following commands:

*

  ```
  cd <yourRepoName-backup>git lfs fetch --allgit lfs ls-files --debug --all | grep oid | awk 'FNR >= 1 {print $3}' >  /path/oid.txt
  ```

Once that has been performed, you can choose to archive/back these files up locally or upload these to another storage solution.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud