kistn is lightweight backup solution using BorgBackup, Borgmatic and a Hetzner storage box.
Why does this project exist?
I am very forgetful. I've been using Borgmatic to run my backups for a while now, but every time I want to configure a new backup, I need to look up how to do it again. Sure, I could simply write a guide for myself or ask some AI, but I thought: Why not create a small CLI tool that does everything for me. This also solves my second problem: I always forget to actually do the backups. So why not build a tool that guides you through the setup and also reminds you to do your backups, or even does the backups automatically in the background.
Should I use kistn?
If you are also forgetful or you don't want to read up on how Borgmatic works, then I think this might be a helpful tool for you. I've tried to make the user experience as simple as possible and to guide the user through the setup process. I hope that this means that it can even be used by people, who are not heavy-terminal users. However, it is a CLI tool, so if you'd rather just click some buttons in a fancy GUI, there are surely better options out there. Anyway, this tool is far from being a mature software, but I think it is still usable. If you encounter any problems, you can open an issue and hope for a reply. Sorry, I'm often busy. :)
Why should I use a Hetzner storage backup box?
There are many other options out there and I'm not saying Hetzner has the best solution. But considering the options I've used so far, it is probably the best and cheapest option I know. kistn technically works with any server that is running borg and OpenSSH, but it is meant to be used with a Hetzner storage box, because that's what I use. :)
Getting Started
0. Install uv
uv is a really nice Python package manager. It's technically not required to install kistn, but if you don't know what you are doing, simply use uv. You won't be disappointed.
- Check if
uvis already installed:uv --version. - If not, follow the installation instructions or simply run the following command:
curl -LsSf https://astral.sh/uv/install.sh | sh
1. Install kistn
- Install using
uv:uv tool install kistn
2. Check Dependencies
- Run
kistn doctorto see if your system has all the necessary packages installed.
3. (Optional) Add Overdue-Check to Shell Config
If you want to get a reminder to do your overdue backups every time you open a new shell session, then follow the instructions below. The reminder will look something like this:
⚠ WARN: basic: Your last backup was 7 days ago. Run `kistn run basic` to start the backup.
- Open your shell config in your favourite editor. If you are using
zsh, open~/.zshrc. If you are usingbash, open.bashrc. - If you're using
bashorzsh, add the following lines to the very top of your config:
# Check for overdue kistn backups
if [ -f "$HOME/.local/bin/kistn" ]; then
"$HOME/.local/bin/kistn" check-overdue
fi
TODO: add instructions for other shells like fish
4. Setup the Storage Box
- Go to the Hetzner Console and find your storage box.
- Make sure that SSH Support and External Reachability is enabled.
- Keep the page open to look up the hostname, username and port later.
5. Create a Remote Connection
- Run
kistn remote wizard NAMEand follow the instructions.NAMEshould be a simple name to identify your storage box. It probably makes sense to simply adopt the name that is displayed in the Hetzner Console. - Run
kistn remote listto check if the remote connection is ready to use. It should sayreadyin theStatecolumn.
NOTE: If the kistn remote wizard command fails or you interrupt it, you can continue the setup by simply running the command again.
6. Create a Backup Profile
- Run
kistn profile wizard NAMEand follow the instructions.NAMEshould again be a simple name to identify your backup profile, such asbasic,documents,university,photos, ... - Make sure you store your paper key at a secure location.
- Run
kistn profile listto check if the profile is ready. Again, it should sayreadyin theStatecolumn.
NOTE: If the kistn remote profile command fails or you interrupt it, you can continue the setup by simply running the command again.
7. Create your first Backup
- Run your first backup using
kistn run PROFILE-NAME.
8. Check when to do your next Backup
- Use
kistn statusto see when you did your last backup and when the next backup is due. If you chose a frequency of 7, it should sayin 7 days.
License
Distributed under the Apache License 2.0.
Release files for kistn 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kistn-0.1.0.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kistn-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.2 kB
Release files / kistn-0.1.0.tar.gz
| Download URL | kistn-0.1.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aec0764c042e2f7e9e81b39c4a2daf9a87e30171436630a5a45ea4a2033cfd45
|
|
BLAKE2b-256 checksum How to use checksums |
0ab896451086cb2ae39add0b8a5751378b743abc77318caba8063ae5289a55c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / kistn-0.1.0-py3-none-any.whl
| Download URL | kistn-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ae5f8dfbc10b1d6da25d3e6da4141282c7028deed02af62e95a013367c1da36
|
|
BLAKE2b-256 checksum How to use checksums |
e5a6f38c5d59b2279e6ac0bc4b7f955f948f4b319e4e23c65ad457b696a67401
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|