Code Monkey home page Code Monkey logo

rsink's Introduction

rsink

rsink is a command line tool for managing and executing data transfer plans using rsync.

Getting started

Clone rsink using git clone https://github.com/adamlazz/rsink.git, or download and unzip a release from the [releases] 1 page. You can move the resulting rsink directory wherever you want.

In order to run rsink/rsink.sh you must set up your rsink directory. Inside this directory, there is a config file where your sources and destinations are listed. There is also a profiles directory, where you can manage rsync options for different backup schemes. Set up your config file and profiles (below) and then run rsink.

./rsink.sh <options>
    -d or --dry-run     # Dry run (Don't run rsync)
    -h or --help        # Display help
    -s or --silent      # Silent output
    -v or --version     # Displays version

Configuration

The config file provides instructions for rsync on the sources and destinations for your backups. Each entry of the file is formatted like so:

profile name (required)
source path (required)
destination path (required)
destination folder (required and must exist)
exclude
...
<new line>
  • A # at the beginning of a line indicates a comment.
  • There should not be a / character at the end of the destination volume or at the beginning of the destination folder.
  • Destinations that are not mounted will be skipped.
  • Destination folders can be . for root of drive. Otherwise, the folders must exist.
  • There can be 0 or more excludes.
  • An new line character \n indicates the end of a backup configuration.

Profiles

The profiles directory contains files that create different sets of options for rsync to use. The profile's name is the name of the file. For example, the dump profile uses the following options:

a   # archive
E   # preserve executability
progress
ignore-existing
  • A # character indicates the start of a comment. Blank lines are also permitted.
  • <source> and <dest> are available as placeholders, so that profiles are not tied to specific sources or destinations.

Included profiles

  • dump Copies source's new or changed files to the destination. Deleted files on the source will not be deleted from the destination.
  • sync Source to destination sync. Files no longer on the source will be deleted from the destination if they exist.
  • backup Versioned backup using rsync --link-dest=PATH. PATH is the location of the symbolic link to the most recent backup. You may use <dest> as a placeholder for the destination volume. A destination folder must be assigned in the config file and this folder must exist. Date and time data will be added to this destination folder to identify backups.

rsink's People

Contributors

adamlazz avatar

Stargazers

 avatar Anton Livaja avatar Dave Druska avatar

Watchers

 avatar Dave Druska avatar James Cloos avatar

Forkers

druska

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.