backup

command module
v0.0.0-...-1d5039a Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: MIT Imports: 11 Imported by: 0

README

Build Status codecov

backup

backup is a simple and configurable wrapper of rsync to easily perform backups and restore backups.

Disclaimer: this tool is not a production ready tool and you should use with care and knowledge ! Always use -f flag before an operation to make a dry run.

Installation

go get -u github.com/nikkolasg/backup

Configuration

Fresh Configuration

backup requires to know at least two informations:

  • Local root: the absolute path from which where to backup files and folders. It can be /home/ubuntu for example, or / if you wish to backup from your root directory. This is required from rsync.
  • Remote root: the absolute path on the destination. This must be understood as rsync so it can be /backup/ubuntu or [email protected]:/backup/ubuntu for a remote server destination.
backup init --remote <remote> --local <local>
Remote Configuration

backup can fetch the configuration already stored on a remote server (or different path locally, whatever rsync accepts) and sets it up internally. To do this, simply run the following:

backup init --from USER@HOST:PATH

Note the argument to --from can be anytihng rsync accepts.

Config Folder

If you want to use a custom configuration folder, specify:

backup init --config <custom folder>

Note this flag must be specifed for all the subsequent commands.

Adding folders to upload

Adding folders / files is as easy as:

backup upload add <path1> <path2> ...

TODO: add --download to automatically add it to download.

Adding folders to download

You must specify all folders to download to backup. You don't necessarily want to download all files you have backed up (for example large files that you are fine keeping on the destination path).

backup download add <path1> ...

Note that path1 must be included in the upload list to be valid. backup doesn't allow to restore a file not tracked in upload yet.

TODO: make list argument

TODO: git restore

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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