go-backup

module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0

README

Go Backup

Build Status

This repository contains a Go application to execute the backup command on multiple projects and copy the generated backup files into global backup folders or send it to a sftp server. If an error occurs, an email is sent.

Content

Requirements

In development, you'll need to install Go on your machine.

Tested versions
  • bash (Tested: v4.4.19)

Development:

  • go (Tested: v1.12.*)

Build the project

In order to copy the default configuration, please run the following script:

./bin/install_all.sh

In development, you can build the project with the following command:

GO111MODULE=off go get github.com/go-bindata/go-bindata/...
go generate ./...
go build -o build/go-backup ./cmd

Usage

You can directly run the binary (no arguments defaults the config to ./config.yml).

./build/go-backup run

Or specify the config file path :

./build/go-backup run -c $(pwd)/config.yml

And you can run this project with a real crontab command as well:

crontab -e

And add this lines at the end:

* * * * * {{absolute_path_to_go_backup_dir}}/build/go-backup run -c {{absolute_path_to_go_backup_dir}}/config.yml 2>> {{absolute_path_to_go_backup_dir}}/error.log

You can redirect the stdout to a log file to spot the configuration errors.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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