GithubHelp home page GithubHelp logo

increback's Introduction

Description

It makes incremental backups with rsync.

It creates a fully functional (and apparently, complete) copy of the current state of the directory to back up, that can be traversed, read, and copied from as normal. However, it takes advantage of hard links in Linux to link files unmodified from previous backups. This way the backup is incremental, in the sense that only new and modified files are actually copied, while the rest is linked and does not fill up disk space.

Whichever backup can be deleted and, due to how hard links work, the rest of the backups will not be affected at all.

Depencencies

increback makes use of the logworks lib, by the same author. logworks is not distributed with increback, but can be independently obtained from https://github.com/isilanes/logworks.

Usage

For usage, run:

$ python3 increback.py -h

The script expects to read from a configuration file in JSON format (see 'sample.json'). This file should contain a dictionary with two keys: "items" and "colors".

items

One dictionary per item, where the key should be the name of the item (e.g. "photos"), and its value another dictionary with the following keys:

  • active. Its value should be either "true" (if we want this element to be backed up when the script is run), or "false" (to deactivate backup of this element without having to delete it from the conf).
  • fromdir. Its value should be a string with the path of the directory we want to back up.
  • todir. Its value should be a string with the path of the base directory where the backup will be made. Final backup dirs are subdirs of this path, their name being the date of the backup, in YYYY-MM-DD format (e.g., if "todir" is "/mnt/backup/photos/", a backup made today would reside in directory "/mnt/backup/photos/2017-07-24").

colors

Optional values for terminal colors to colorize some outputs. They should be integers in the 31--37, 41--47 ranges, just as regular codes for terminal color printing.

  • error. The color for the "ERROR" keyword. We suggest "31" (red).
  • name. The color of some elements that are names (paths to files, item names...).

increback's People

Contributors

isilanes avatar

Watchers

 avatar James Cloos 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.