Coder Social home page Coder Social logo

restic-control's Introduction

restic-control

What is this?

This is a thin wrapper around the restic tool. It sets up the appropriate environment to enable me to easily run it as backup software.

Installation

Before running this tool, you need to create a .env file in the project root directory, which contains the appropriate values to enable restic to run as intended. You can find an example to customize in env_base.txt. Running the tool without the .env file will cause env_base.txt to be copied to .env. This will help you get started, but you'll still have to edit .env.

Before running a backup, you should also create includes and excludes files, as referenced in the sample .env.

Usage

Except as indicated below, any arguments given to restic_control.py are passed unchanged to restic.

  • If the first argument to restic_control.py is backup, then a backup will be triggered as configured from the .env file. All arguments except backup will be passed to restic. Note that restic_control.py will specify arguments of its own in addition to whatever is passed on the command line.
  • If the first argument is prune, then this script will do restic forget --prune with the built in schedule of what to keep.
  • A first argument of check runs a basic verification of the repository.
  • A first argument of check_read does a check, followed by a test read of 1/7 of the repository, as determined by the day of the week.

Combo commands

The first argument can be a list of the above commands, separated by /. The commands will be executed in sequence, and execution will stop if any command returns a nonzero exit status.

Examples

  • restic_control.py backup/check
  • restic_control.py backup/check_read

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.