Giter Site home page Giter Site logo

backup-daemon's Introduction

backup-daemon

A realtime differential backup daemon in nodejs.

Installation

npm install backup-daemon -g

Usage

Local backup

# Create a realtime backup of Pictures into PicturesBackup:
backup-daemon Pictures/ PicturesBackup/

# Create a realtime backup of the file important.txt into important-backup.txt
backup-daemon important.txt important-backup.txt

Remote backup

For remove backup, a valid ssh destination have to be provided. In order to avoid the prompt asking for your password in every synchronization, you can create a passphraseless SSH key and copy it into your remote machine, this process is described in the section generate a SSH key.

# Create a realtime backup of Pictures into Pictures in a different machine using ssh
backup-daemon ~/Pictures/ [email protected]:/home/pi/Pictures/

Generate a SSH key

This is an optional step to remove the password prompt asking for your password in remote backup.

# Leave all fields empty
$ ssh-keygen -t rsa -b 2048

$ ssh-copy-id user@server

Options

$ backup-daemon -h
Usage: backup-daemon source destination [options]

Options:
      --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]
  -w, --wait     Delay to do the backup in milliseconds after changes
                                                                 [default: 5000]
  -d, --delete   Deletes will be replicated in backup                  [boolean]
  -q, --quiet    Disable rsync logs                                    [boolean]
  -i, --ignore   Exclude a pattern from transfer                         [array]
  -l, --log      Log level
          [string] [choices: "debug", "info", "warn", "error"] [default: "info"]

Examples

Execute the backup 500 ms after changes, replicate deletes, ignore "folder1/", "My Text.txt" and hidden elements (files or folders that start by the character dot) and using log level debug:
$ backup-daemon source/ destination/ -w 500 -d -i folder1/ My\ Text.txt ".*" -l debug

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.