Giter Site home page Giter Site logo

backer-rs's Introduction

backer-rs

Never Loose data/notes - An efficient git based backup tool to save your changes periodically.

A git based backup tool. Intelligent enough to trigger a commit, only, if there are any file changes in the folder it is pointed to. Based on cross-platform file notification library.

Example use cases:

  • Can be pointed to storage locations of note applications like boostnote

Build

  • cargo build --release
  • backer-rs is the executable generated in target/release/ folder.

Usage

backer-rs -p <path to the folder to backup> -f 2 -c 300 -n krishnakumar -e <email id of author> -d "Commiting all changes"

  • -p or --path path to monitor for changes, Note: This path will be converted to git repo (Mandatory)
  • -f or --ffreq time delay(seconds) between monitoring file changes
  • -c or --cfreq Wait time before making an automated commit after first file change
  • -n or --sname Name of the author to be added as signature for commit (Mandatory)
  • -e or --semail Email id of the author to be added as signature for commit (Mandatory)
  • -d or --defcommitmsg default automated commit message

backer-rs -p <path to the folder to backup> -n krishnakumar -e <email id of author>

  • Default file monitoring time is 2 seconds
  • Default wait time to commit is 5 seconds
  • Default commit message is Committed all changes

Usage with auto push feature using ssh

backer-rs --path <path to the folder to backup> --semail <email id of author> --sname krishnakumar -u [email protected]:krishnakumar4a4/notes.git -k id_rsa_backer_rs

  • -k or --pkey local path to ssh private key for which corresponding public key is configured.
  • -u or --remoteurl remote upstream url to which the commits are pushed

Install as service in mac

  • Create service binary in release mode make release

  • Install binary as mac service

sudo REPO_PATH="<Path to repo, same as -p argument>" SIGN_EMAIL="<Email for signature, same as -e argument>" SIGN_NAME="<Author name for signature, same as -n argument>" REPO_REMOTE="<Remote upstream URL, same as -u argument>" SSH_KEY_PATH="<Path to SSH private key, same as -k argument>" INFO_LOG_PATH="/<Path for info log>/info.log" ERROR_LOG_PATH="/<Path for error log>/error.log" make install-mac

Stop and Uninstall mac svc

  • Stop the service sudo make stop-svc
  • Uninstall the service sudo make uninstall-mac

backer-rs's People

Contributors

krishnakumar-tw avatar krishnakumar4a4 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cyucelen

backer-rs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.