github.com/foi/backup-cr

Backup service written in crystal

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  backup_cr:
    github: foi/backup-cr
    version: ~> 0.5.4

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
foi
Target
  • backup-cr from src/backup-cr.cr

Dependencies

Runtime Dependencies

  • router0.2.8github: tbrand/router.cr

README

backup-cr static build x86_84

development in progress

HOW TO INSTALL

Deb-like

sudo su
apt install -y apt-transport-https
echo -e "deb https://repos.foifirst.me/backup-cr/debs stable main" > /etc/apt/sources.list.d/backup-cr.list
wget -O - https://repos.foifirst.me/foi.gpg | apt-key add -
apt update
apt install backup-cr

RPM-like

sudo su
cat << EOF > /etc/yum.repos.d/backup-cr.repo
[backup-cr]
name=backup-cr repo
baseurl=https://repos.foifirst.me/backup-cr/rpms
enabled=1
gpgcheck=1
skip_if_unavailable=1
gpgkey=https://repos.foifirst.me/foi.gpg
EOF
yum install backup-cr

FEATURES

  1. single executable with no dependencies
  2. backup files, lvm volumes, docker volumes with configurable gzip compression level
  3. save it to local path or remote path via sshfs and public key auth
  4. ability to custom hook for events
  5. ACL based on ip-adresses
  6. custom backup extension (simple ransomware protection)
  7. config via ENV variables or .env file

Installation

server

  1. create group with fixed group id: sudo groupadd -g 5000 backup-files
  2. create user with fixed id: sudo useradd -u 5000 -m -G backup-files backup-worker
  3. chown -R backup-worker:backup-files backup-files

backup fileserver

  1. create group with fixed group id: sudo groupadd -g 5000 backup-files
  2. create user with fixed id: sudo useradd -u 5000 -m -G backup-files backup-worker
  3. chown -R backup-worker:backup-files PATH_TO_BACKUP_FILES

client

Usage

TODO: Write usage instructions here

TODO

  • Should work without lvm
  • web ui

Contributing

  1. Fork it (https://github.com/foi/backup-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • foi - creator and maintainer