An open API service indexing awesome lists of open source software.

https://github.com/ciehanski/kip

A simple encrypted backups tool written in Rust.
https://github.com/ciehanski/kip

argon2 aws-s3 backup backup-cli backup-manager backup-tool backup-utility backups chacha20poly1305 cli encryption rust s3

Last synced: about 2 months ago
JSON representation

A simple encrypted backups tool written in Rust.

Awesome Lists containing this project

README

          

# kip [![build](https://github.com/ciehanski/kip/actions/workflows/ci.yml/badge.svg)](https://github.com/ciehanski/kip/actions/workflows/ci.yml)

⚠️ This project is still in active development and is not ready for production, but it works ⚠️

Encrypted backups using [XChaCha20Poly1305](https://tools.ietf.org/html/rfc7539) AEAD with a 24-byte nonce generated by
OS calls. The key used is a 32-byte hash of a user provided secret utilizing [argon2id](https://en.wikipedia.org/wiki/Argon2),
a hybrid version of the key derivation functions: argon2i & argon2d. This is used for verifying any changes to
your backup jobs as well as encrypting all files that are uploaded to the specified provider.
Compression is enabled by default using [zstd](https://en.wikipedia.org/wiki/Zstd). [FastCDC](https://www.usenix.org/system/files/conference/atc16/atc16-paper-xia.pdf) is implemented for deduplication. Lastly, all uploads are completed asyncrousnously!

kip is the result of a personal challenge. Firstly, learn Rust. Secondly,
build myself a replacement encrypted backup tool because the one I'm currently using has
an expiring trial, which ends soon. It's closed source as well so I
really don't know if the implementation of their encryption suite is flawed or not.
Plus, I really wanted to look into using XChaCha20Poly1305 which is not usually
supported by your typical backup tool. There's plenty of other open source encrypted
backup options available, but this seemed like more fun for me.

Backups and restores are functional in the current state. I'm still heavily
modifying the API and configuration files, though. Upgrade paths will be provded
when necessary.

## Features

- Backups are fully encrypted w/ XChaCha20Poly1305
- zstd for backup compression
- FastCDC for chunking & deduplication
- Async upload to **AWS S3**
- Async upload to **Google Drive**
- Async(ish) upload to **USB drives**

## TODO

- Add network path (SMB / NFS) as a provider
- Add backup rotation support
- Improve logging

## Usage

#### Create a new backup job:

```bash
$ kip init
$ kip init documents_backup
$ kip init profile_backup
```

#### Remove a backup job:

```bash
$ kip remove
$ kip rm documents_backup
```

#### Add files to a backup job:

```bash
$ kip add -f
$ kip add documents_backup -f "Documents/"
$ kip add profile_backup -f "Documents/" "Desktop/" "Downloads/" ".bashrc"
```

#### Remove files from a backup job:

```bash
$ kip remove -f
$ kip rm profile_backup -f ".bashrc" "Desktop/"
```

#### Remove a file from a backup job and purge it from all previous backups:

```bash
$ kip remove -f -p
$ kip rm documents_backup -f ".bashrc" -p
```

#### Exclude a file from a backup job

```bash
$ kip exclude -f
$ kip exclude documents_backup -f ".bashrc"
```

#### Exclude a file extension from a backup job

```bash
$ kip exclude -e
$ kip exclude documents_backup -e "pdf"
```

#### Start a manual backup run:

```bash
$ kip push
$ kip push documents_backup
```

#### Start a restore:

```bash
$ kip pull -r
$ kip pull documents_backup -r 1
```

#### Pause a job:

```bash
$ kip pause
$ kip pause documents_backup
```

#### Resume a job:

```bash
$ kip resume
$ kip resume profile_backup
```

#### List backup jobs with their metadata:

```bash
$ kip status -r
$ kip status
$ kip ls documents_backup
$ kip ls documents_backup -r 1
```