# backup-daemon

> A realtime differential backup daemon in nodejs.

Latest version **1.0.2** (published 2023-03-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install backup-daemon
pnpm add backup-daemon
yarn add backup-daemon
bun add backup-daemon
```

Provides the command `backup-daemon`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-03-15 |
| First published | 2015-12-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alejandro Santiago Nieto |
| Maintainers | alemures |

## Links

- npm: https://www.npmjs.com/package/backup-daemon
- Repository: https://github.com/alemures/backup-daemon
- Homepage: https://github.com/alemures/backup-daemon#readme
- Issues: https://github.com/alemures/backup-daemon/issues
- npm.io page: https://npm.io/package/backup-daemon

## Dependencies (5)

- [rsync](https://npm.io/package/rsync.md) ~0.6.1
- [yargs](https://npm.io/package/yargs.md) ^17.6.2
- [winston](https://npm.io/package/winston.md) ^3.8.2
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [taskerjs](https://npm.io/package/taskerjs.md) ^2.0.1

## Recent versions

- 1.0.2 (latest) — 2023-03-15
- 1.0.1 — 2021-09-30
- 1.0.0 — 2017-12-06
- 0.0.3 — 2015-12-23
- 0.0.2 — 2015-12-21
- 0.0.1 — 2015-12-20

## README

# 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`

---
_Source: https://npm.io/package/backup-daemon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
