Skip to content

N-Coder/borgmacator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Borgmacator

Borgmacator is a GNOME AppIndicator for Borgmatic.

Screenshot

The menu displays the status of the systemd service, the healthchecks and the most recent journal entries. Additionally, there are some buttons for quickly accessing common actions. If there are any healthchecks down, their number will show up next to the icon. The topbar icon displays the following states:

doneDone. Last run was successful and not too long ago.
doneRunning.
doneCondition check (e.g AC Power) resulted in backup being skipped.
doneError. Last run was not successful.
doneStarting. Sleeping for some time before starting the service.

Installation

First, make sure that you have PyGObject ready and the AppIndicator-support extension enabled. Install the package directly from GitHub using pip, preferably into a venv:

python3 -m venv ~/.local/share/borgmacator/venv --system-site-packages
source ~/.local/share/borgmacator/venv/bin/activate
pip install git+https://github.com/N-Coder/borgmacator.git#egg=borgmacator
borgmacator-autostart

The borgmacator-autostart script will enable autostarting borgmacator when you login to your GNOME session by creating the file ~/.config/autostart/borgmactor.desktop. Additionally, it will create a ~/.config/borgmacator.json file with the following config, which you should modify to your needs:

{
  "healthchecks": {"api_key": "TODO", "filter": []},
  "terminal": {"path": "gnome-terminal", "args": ["--"], "kwargs": {}},
  "log_lines": 10,
  "update_interval": 15
}

Note that the indicator currently won't work without an healthchecks API key configured. If you don't want to relogin, you can start the indicator manually using the borgmacator command, or use borgmacator-restart to stop all running instances and start a new instance in the background (like running it via Alt+F2).

Warning

This is alpha-level software. Expect it to contain bugs and not run on your setup. I wrote this small script mostly to monitor my own backup, but thought it could also be useful to others. If you have any issues, have a look at the code and modify it to suit you needs (and maybe open a PR if you think your changes might be useful to others, too 😉).

License

Borgmacator, borgmatic and the borgmatic logo used are licensed under the GNU General Public License version 3 or any later version. The icons are tinted version of the original logo by Dan Helfman ([email protected]).

Interesting links

Why not a GNOME extension / argos script

See here. Using PyGObject and AppIndicator doesn't couple the code to GNOME Shell or some version of it and should (hopefully) be more stable than the GNOME extension API.

About

A small, hacky GNOME AppIndicator for Borgmatic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages