Categorygithub.com/transchain/go-backup
module
1.0.0
Repository: https://github.com/transchain/go-backup.git
Documentation: pkg.go.dev

# 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.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author