Skip to content
/ kip Public

A simple encrypted backups tool written in Rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ciehanski/kip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kip build

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

Encrypted backups using XChaCha20Poly1305 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, 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. FastCDC 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:

$ kip init <job>
$ kip init documents_backup
$ kip init profile_backup

Remove a backup job:

$ kip remove <job>
$ kip rm documents_backup

Add files to a backup job:

$ kip add <job> -f <files>
$ kip add documents_backup -f "Documents/"
$ kip add profile_backup -f "Documents/" "Desktop/" "Downloads/" ".bashrc"

Remove files from a backup job:

$ kip remove <job> -f <files>
$ kip rm profile_backup -f ".bashrc" "Desktop/"

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

$ kip remove <job> -f <files> -p
$ kip rm documents_backup -f ".bashrc" -p

Exclude a file from a backup job

$ kip exclude <job> -f <files>
$ kip exclude documents_backup -f ".bashrc"

Exclude a file extension from a backup job

$ kip exclude <job> -e <file_extension>
$ kip exclude documents_backup -e "pdf"

Start a manual backup run:

$ kip push <job>
$ kip push documents_backup

Start a restore:

$ kip pull <job> -r <run>
$ kip pull documents_backup -r 1

Pause a job:

$ kip pause <job>
$ kip pause documents_backup

Resume a job:

$ kip resume <job>
$ kip resume profile_backup

List backup jobs with their metadata:

$ kip status <job> -r <run>
$ kip status
$ kip ls documents_backup
$ kip ls documents_backup -r 1