Skip to content

go command line to clone/pull all your repositories from Gitlab

License

Notifications You must be signed in to change notification settings

Frontware/GitLabBack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitLabBack

Go Report Card

GitLabBack is a tool to backup your git repositories from GitLab to your disk.

GitLabBack creates a backup by cloning repositories from GitLab. If the backup already exists, GitLabBack will pull changes instead of cloning the repositories. However, if git fails to pull new changes from GitLab, GitLabBack will delete the backup and clone it again.

Usage

$ ./GitLabBack

Help

$ ./GitLabBack -h
Usage of GitLabBack:
  -config string
        Config path (default "~/.gitlabback")
  -dir string
        Backup directory
  -ssh
        Enable ssh clone
  -token string
        GitLab token
  -url string
        GitLab server base url

Configuration

Default configuration file is ".gitlabback".

  • baseURL Link to GitLab server (default: https://gitlab.com/)
  • token Private token
  • backupdir Your backup directory
  • ssh Clone with ssh (token is not needed)
{"baseURL":"","token":"YOUR TOKEN","backupdir":"","ssh":false}

Build

If you have Golang 1.11.x+ installed, you can clone the repository and:

$ go build

To ease the compilation process, the developer can use the provided Makefile.

$ make                    # builds for linux and windows
$ make linux              # builds for linux
$ make windows            # builds for windows
$ GOARCH=arm64 make linux # builds for arm64 linux

Start off from fresh build.

$ make clean # removes go binaries

About

go command line to clone/pull all your repositories from Gitlab

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published