Config driven, easy backup cli for restic.
Go to file
Nicco 1f4f1a1855
Merge pull request #5 from EliotBerriot/1-s3
Fix #1: fixed broken initialization check under S3
2019-12-03 09:39:25 +01:00
docs sketch 2019-10-26 21:21:56 +02:00
src Fix #1: fixed broken initialization check under S3 2019-12-02 11:14:02 +01:00
.gitignore remove sample 2019-10-26 21:31:33 +02:00
.prettierrc prettier and ignore yarn 2019-10-26 20:06:48 +02:00
install.sh use bash 2019-11-27 19:30:01 +01:00
LICENSE Initial commit 2019-06-20 10:17:20 +02:00
package.json prettier and ignore yarn 2019-10-26 20:06:48 +02:00
README.md Update README.md 2019-12-03 09:19:26 +01:00
tsconfig.json dev files 2019-06-20 23:09:33 +02:00

autorestic

High backup level CLI utility for restic.

Autorestic is a wrapper around the amazing restic. While being amazing the restic cli can be a bit overwhelming and difficoult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂

Sketch

🌈 Features

  • Config files, no CLI
  • Predictable
  • Backup locations to multiple backends
  • Simple interface
  • Fully encrypted

Installation

curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash

🚀 Quickstart

Setup

First we need to configure our locations and backends. Simply create a .autorestic.yml either in your home directory of in the folder from which you will execute autorestic.

Optionally you can specify the location of your config file by passing it as argument: autorestic -c ../path/config.yml

locations:
  home:
    from: /home/me
    to: remote
  
  important:
    from: /path/to/important/stuff
    to:
      - remote
      - hdd

backends:
  remote:
    type: b2
    path: 'myBucket:backup/home'
    B2_ACCOUNT_ID: account_id
    B2_ACCOUNT_KEY: account_key
  
  hdd:
    type: local
    path: /mnt/my_external_storage

Then we check if everything is correct by running the check command. We will pass the -a (or --all) to tell autorestic to check all the locations.

autorestic check -a

If we would check only one location we could run the following: autorestic -l home check.

Backup

autorestic backup -a

Restore

autorestic restore -a -- --target /path/where/to/restore

🗂 Locations

A location simply a folder on your machine that restic will backup. The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.

locations:
  my-location-name:
    from: path/to/backup
    to:
      - name-of-backend
      - also-backup-to-this-backend

💽 Backends

Backends are the place where you data will be saved. Backups are incremental and encrypted.

Fields

type

Type of the backend see a list here

Supported are:

For each backend you need to specify the right variables as shown in the example below.

path

The path on the remote server. For object storages as

Example
backends:
  name-of-backend:
    type: b2
    path: 'myAccount:myBucket/my/path'
    B2_ACCOUNT_ID: backblaze_account_id
    B2_ACCOUNT_KEY: backblaze_account_key
Note

Note that the data is automatically encrypted on the server. The key will be generated and added to your config file. Every backend will have a separate key. You should keep a copy of the keys somewhere in case your server dies. Otherwise DATA IS LOST!

Contributors

  • @ChanceM