📦 borgjs
A tiny wrapper for BorgBackup to automate your backup workflow
Overview
Please note borgjs needs you to run node >=4 and has been tested using borg v1.0.7
borgjs is a nodejs command line tool for BorgBackup.
After having tried a lot of backup solutions for my data, I've been using Borg for quite a while. It's rock solid and never let me down.
It supports compression and authenticated encryption.
Backups should be as boring as possible, that's why I've created this tool in order to automate and constantly monitor the whole process, making it a little bit more user friendly.
Instead of writing complex bash scripts you can now just write a declarative configuration file, run borgjs in a crontab and forget about it.
It will take care of your backup workflow, sending you reports and writing detailed log files.
Also the console output looks pretty good.
Features
- backup creation
- prune old backup according to a set of rules declared in the configuration file.
- check backups for consistency and integrity
- send success/failure reports via email, push notifications on your phone or native OS notifications
- lockfile system based on PID in order to avoid concurrent backups to the same destination
- logs to a different file details about the backup session such as borg output and commands executed
- highly configurable
Notifications
borgjs supports a wide range of notifications, besides detailed logs creation.
This enables you to always keep an eye on your backups.
Notifications will never contain sensitive informations such as encryption keys of files involved in the backup process.
They will just contain the path of the generated log file and the status (success/error).
-
push notifications (via pushbullet)
Configuration
module.exports = {
repository: '',
paths: [
],
compression: '',
check: true,
sendSystemNotification: true
}
CLI Usage
Running a backup is as easy as creating a borg repository and run
$ borgjs --config=/User/me/borgjs.config.js
$ borgjs --help
📦 A tiny wrapper for BorgBackup to automate your backup workflow
Usage
$ borgjs <options>
Options
-c, --config path of a borgjs config file.
Examples
borgjs --config=/User/me/borgjs.config.js
Automate
A backup is not a backup if it's not automated.
I personally use cronnix to schedule my backup sessions on my mac.
I also run it on a headless Raspberry Pi.
Recipes
-
Borg can store data on any remote host accessible over SSH. If you prefer to store your offsite backup in some other fancy cloud storage, you can always backup to a local target, then upload it anywhere using rclone
-
I personally use rsync.net for my backup, they also apply dirty cheap pricing model to borg users.
Please not I'm not affiliated with them, I'm just an happy paying customer.
Change Log
This project adheres to Semantic Versioning.
Every release, along with the migration instructions, is documented in the CHANGELOG.md file.
License
MIT