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.
- Can be pointed to storage locations of note applications like boostnote
cargo build --release
backer-rs
is the executable generated intarget/release/
folder.
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
backer-rs --path <path to the folder to backup> --semail <email id of author> --sname krishnakumar -u git@github.com: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
-
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 the service
sudo make stop-svc
- Uninstall the service
sudo make uninstall-mac