GithubHelp home page GithubHelp logo

kbh's Introduction

kbh

Krathalan's Borg Helper

WARNING: IN DEVELOPMENT, all Readme/man page info may NOT match what the code actually does!

JSON-based, config-driven manager for easily managing multiple borg repositories. You define paths to backup, repositories with individual BORG_PASSPHRASE and compression settings, and more.

Features

kbh lets you refer to your repositories using the repository names you have defined in your configuration. One repository can be referred to with multiple different names (see alternative_names in the config example below). kbh will use the configured password command for each repo to skip password prompts.

Instead having to put in your password and remember to type:

$ borg create --compression zstd,10 --stats --progress "ssh://[email protected]:port/path/to/repo::$(date +%some-%weird-%cmd)" /multiple/backup /paths/to/backup

You can type:

$ kbh backup reponame

Continuing the example, the config for the above command would look something like:

{
  "borg_archive_name_command": "date +%some-%weird-%cmd",
  "ssh_key_password_copy_command": "pass c ssh-password",
  "mount_point": "/mnt/borg",
  "backup_paths": ["/multiple/backup", "/paths/to/backup"],
  "repos": [
    {
      "name": "reponame",
      "alternative_names": ["reponame-main"],
      "path": "ssh://[email protected]:port/path/to/repo",
      "password_command": "pass s borg-reponame",
      "compression": "zstd,10"
    }
  ]
}

Subcommands

Implements most common borg subcommands as the same subcommand name, such as:

  • backup (borg create ...)
  • delete
  • init
  • info
  • list
  • mount
  • prune

Additional kbh-only commands:

  • help
  • status

Most kbh commands will work either with no arguments (performs subcommand on all repos) or by specifying repo (and optionally archive for some commands, like kbh mount).

See the man page for more information, including usage examples, flags and override variables, configuration file information and examples, and more.

Sanity checking

kbh will attempt to sanity check most commands -- for example, kbh mount will check to make sure (1) your mount directory exists, and (2) that something isn't already mounted on that directory.

However, apart from ensuring your configuration is a valid JSON file, kbh will NOT attempt to sanity check any of the values you have put in. For example, kbh will NOT check the names you have defined for your repositories are unique.

Install

Arch PKGBUILD in my personal repo: https://github.com/krathalan/pkgbuilds

kbh's People

Contributors

krathalan avatar

Watchers

 avatar

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.