mirror of
https://github.com/cooperspencer/gickup.git
synced 2026-10-19 16:16:46 +00:00
added lfs to s3
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user