<commit_before># backup-to-cloud

[![Travis branch](https://img.shields.io/travis/avaly/backup-to-cloud/master.svg?style=flat-square)](https://travis-ci.org/avaly/backup-to-cloud)
[![Codecov branch](https://img.shields.io/codecov/c/github/avaly/backup-to-cloud/master.svg?style=flat-square)](https://codecov.io/gh/avaly/backup-to-cloud)

A simple backup tool which uploads encrypted files to S3, in batches.

Ideally, it should be setup to run in a crontab entry.

## Features

- Encrypts files locally with `gpg`
- Uploads files to S3 in batches of customizable size
- Rescans sources at specific intervals to find new or updated files
- Removes files from S3 if they are removed locally

## Requirements

- OS: Linux, MacOS (untested)
- node.js 6+
- [`awscli`](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) 1.8.6+ (for support of `STANDARD_IA` storage class)
- `find`
- `gpg`

## Install

- `cp config.sample.js config.default.js`
- Modify your new config file
- Double check your config file: `bin/backup-to-cloud --check-config`
- Try it out first with: `bin/backup-to-cloud --dry`
- Set up a crontab entry for it, for example:
  - run every hour with verbose logging:

  ```
  0 * * * * cd /path/to/this && ./bin/backup-to-cloud --verbose >> cron.log 2>&1
  ```
  - run every 12 hours:

  ```
  0 */12 * * * cd /path/to/this && ./bin/backup-to-cloud >> cron.log 2>&1
  ```

## Tools

### backup-to-cloud

```
./bin/backup-to-cloud --help
./bin/backup-to-cloud --check-config
./bin/backup-to-cloud --dry
```

### backup-decrypt

```
./bin/backup-decrypt --help
./bin/backup-decrypt --output OUTPUT_FILE INPUT_FILE
```
<commit_msg>chore: Add restore to readme [skip ci]<commit_after># backup-to-cloud

[![Travis branch](https://img.shields.io/travis/avaly/backup-to-cloud/master.svg?style=flat-square)](https://travis-ci.org/avaly/backup-to-cloud)
[![Codecov branch](https://img.shields.io/codecov/c/github/avaly/backup-to-cloud/master.svg?style=flat-square)](https://codecov.io/gh/avaly/backup-to-cloud)

A simple backup tool which uploads encrypted files to S3, in batches.

Ideally, it should be setup to run in a crontab entry.

## Features

- Encrypts files locally with `gpg`
- Uploads files to S3 in batches of customizable size
- Rescans sources at specific intervals to find new or updated files
- Removes files from S3 if they are removed locally

## Requirements

- OS: Linux, MacOS (untested)
- node.js 6+
- [`awscli`](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) 1.8.6+ (for support of `STANDARD_IA` storage class)
- `find`
- `gpg`

## Install

- `cp config.sample.js config.default.js`
- Modify your new config file
- Double check your config file: `bin/backup-to-cloud --check-config`
- Try it out first with: `bin/backup-to-cloud --dry`
- Set up a crontab entry for it, for example:
  - run every hour with verbose logging:

  ```
  0 * * * * cd /path/to/this && ./bin/backup-to-cloud --verbose >> cron.log 2>&1
  ```
  - run every 12 hours:

  ```
  0 */12 * * * cd /path/to/this && ./bin/backup-to-cloud >> cron.log 2>&1
  ```

## Tools

### backup-to-cloud

```
./bin/backup-to-cloud --help
./bin/backup-to-cloud --check-config
./bin/backup-to-cloud --dry
```

### backup-restore

```
./bin/backup-restore --help
./bin/backup-restore --output OUTPUT_DIR_OR_FILE REMOTE_DIR_OR_FILE
```

### backup-decrypt

```
./bin/backup-decrypt --help
./bin/backup-decrypt --output OUTPUT_FILE INPUT_FILE
```

{'fraction_non_alphanumeric': 0.16580161476355249, 'fraction_numerical': 0.00980392156862745, 'mean_word_length': 3.4360613810741687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1107160', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1231, 'n_words': 317}