added lfs to s3

This commit is contained in:
Andreas Wachter
2026-09-11 13:24:19 +02:00
parent 55882ef63e
commit fe501f4d14
5 changed files with 13 additions and 0 deletions
+1
View File
@@ -331,6 +331,7 @@ destination:
storageclass: "" # storage class for all repos to be uploaded to this S3 bucket. E.g. for AWS: STANDARD, STANDARD_IA, GLACIER, etc.
src_repo_url_tag_key: "" # if set, tag each uploaded object with this key and the source repo URL as value. Leave unset to disable tagging.
datecreatedir: false # if true, gickup will create a directory for backup with the creation date
lfs: true # clone lfs repos, !! ATTENTION !! git and git-lfs must be installed on the system!
azureblob:
- url: https://yourstorageaccount.blob.core.windows.net # blob storage endpoint for your storage account, can be a SAS url
container: name of your blob container
+4
View File
@@ -618,6 +618,10 @@
"datecreatedir": {
"type": "boolean",
"description": "If true, gickup will create a directory for backup with the creation date"
},
"lfs": {
"type": "boolean",
"description": "uses lfs to clone repositories"
}
},
"additionalProperties": false
+6
View File
@@ -604,6 +604,12 @@ func tempCloneBase(repo types.Repo, tempdir string, isBare bool) (*git.Repositor
return r, lfsErr
}
// Bare backups already contain all refs and LFS objects.
// Checkout and pull require a working tree and must not run for these clones.
if isBare {
return r, nil
}
// Get the symbolic reference for HEAD
headRef, err := r.Head()
if err != nil {
+1
View File
@@ -256,6 +256,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
}
defer os.RemoveAll(tempdir)
r.Origin.LFS = d.LFS
tempClonePath := path.Join(tempdir, r.Name)
_, err = local.TempCloneBare(r, tempClonePath)
if err != nil {
+1
View File
@@ -595,6 +595,7 @@ type S3Repo struct {
StorageClass string `yaml:"storageclass"`
DateCreateDir bool `yaml:"datecreatedir"`
SrcRepoUrlTagKey *string `yaml:"src_repo_url_tag_key"`
LFS bool `yaml:"lfs"`
}
func (s3 S3Repo) GetKey(accessString string) (string, error) {