GitLabBack

command module
v0.0.0-...-227cf50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2019 License: MIT Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL