Giter Site home page Giter Site logo

drdbs's Introduction

dctr's rdiff-backup script

This script started as my personal backup script, but as it is getting more general and versatile, i decided to put it on github.

Installation

  1. Put /bin and /etc on your disk

  • /usr/local/bin and /usr/local/etc, or
  • ~/.local/bin and ~/.local/etc

Note: At the moment, etc has to be in the same folder as bin, as files are included via ../etc/...,

  1. Adapt drdbs.conf

drdbs.conf is well documented. Adjust it to your needs.

  1. Adapt drdbs.exclude

This is the most important part: Select, what you want to include or exclude in your backup.

  1. drdbs.exclude uses rdiff-backup's globbing syntax (basic part explained below)
  2. The script includes / to provide complete relative paths
  3. To human logic, the file is interpreted in reverse order

Syntax

  • Lines starting with - mean "exclude".
  • Lines starting with + mean "include"
  • * matches anything but "/" (folder separator), therefore * means "ONE folder (or file)"
  • ** matches "/" too, so **/foo means "any file foo in any folder of any nesting depth"

Creating your own config

As the backup starts at / and you usually only want to backup selected folders (but not e.g. /dev), building you own exclude should start with the following line.

- **

As the file is interpreted in reverse order, any further includes have to be made above that line.

+ /home
- **

You can place an exlude above an include to make an exception for this include

- /home/eve
+ /home
- **

This would backup all home folders, but not Eve's .

You can find an example drdbs.exclude in the etc directory of this repository.

drdbs's People

Watchers

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