Giter VIP home page Giter VIP logo

backer-upper's Introduction

backer-upper

A CLI tool to manage backups

Usage

backer-upper uses gpg for encryption, so you will need that installed and a key generated if you want to encrypt your backups. You can generate a key with this command:

gpg --full-generate-key

Sync files

The sync command requires a specially formatted TOML file that describes a number of backups and their schedules. The sync command consults this file and the last backup performed to determine if it's time for a new backup, and will also delete old redundant backups if required.

The TOML file should be structured like this:

[name-of-backup]
globs = ["/files/to/back/up", "/more/files/to/back/up/*"]
gpg_id = "[email protected]" # Optional
host = "my.remote.host" # Optional
dir = "/backup/dir/"
format = "backup_%Y-%m-%d_%H:%M:%S.tar.gz.gpg"
interval = "1 day"
copies = 3 # Optional

If gpg_id is specified, then the GPG key with that ID will be used to encrypt the backup. Keep in mind that you will need that key to restore the backup.

The host field is only necessary if backups are kept on a remote host. If it is specified, ssh and scp are used to upload the backups automatically.

You can use any valid date format string for format. Do not include any path separators, dir should point directly to the directory containing all the backup files.

interval always looks like {integer} {unit}. A variety of intervals are accepted:

  • "M", "month", "months"
  • "w", "week", "weeks"
  • "d", "day", "days"
  • "h", "hour", "hours"
  • "m", "minute", "minutes"
  • "s", "second", "seconds"

copies determines how many old backups to keep. If there are too many, the oldest is deleted. If copies is not specified, then old backups are never deleted.

If you would like to keep redundant backups on different timescales (i.e. 24 hourly backups, 7 daily backups, 4 weekly backups, and 12 monthly backups), then you should set up multiple sections, each with their own schedule. There will be some redundancy with the most recent backup, but that is the price you pay for simplicity.

backer-upper's People

Contributors

dchiquito avatar

Watchers

 avatar

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.