1.0.2 • Published 1 year ago

backup-daemon v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
1 year ago

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/ pi@192.168.1.27:/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

1.0.2

1 year ago

1.0.1

3 years ago

1.0.0

6 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago