Skip to content

backupsystemNG 2.3.0

Choose a tag to compare

@jotenakis2 jotenakis2 released this 03 Dec 22:49
· 75 commits to master since this release

backupsystemNG 2.3.0 — a failing command stops the run, and the interface says what it is doing.

This release carries the work that was waiting together: the TUI and manual
rework, plus one correction in how the tool reads the output of its own probes.
Five changes, all visible from the command line or the menu.

A command that fails is no longer read as an empty answer

set -e stops a script on error, but bash does not carry it into a command
substitution: a probe that died halfway returned an empty string, and the caller
took that for a reading. A package list cut between two files, a snapshot whose
latest resolved to nothing, a crontab "that does not exist" — each could end up
in a snapshot that looks complete. Subshells now inherit the errexit setting, so
the failure stops the run and names its real cause instead of quietly producing
an incomplete copy.

The TUI chooses its configuration file

The configuration submenu gained a "Load" entry: the default file, the other
.conf files of the same directory, or a path typed in. The choice holds for the
session — the header names the file in use, the following commands carry
--config, and the interface language follows it. A file the check refuses never
takes over: the diagnosis is shown and the file that worked stays loaded. The
menu also redraws on a clean screen, so three round trips no longer leave the
header off-screen.

The snapshot list reads the manifest, and says so while it reads

On a repository reached over ssh, the table froze on its title for a minute: it
asked a remote du for every snapshot and resolved latest once per row. It now
runs the same listing as the CLI — size from the manifest, one latest per tree
— behind a "reading snapshots from the repository" line. Fifty lines of
duplicated logic disappear with the class of bug they carried.

"Press Enter" answers again after a backup

The prompt reads the terminal itself rather than standard input, which a finished
run may have consumed, and the foreground is reclaimed when it belongs to a
process group that is gone. A gum left over from a menu is reaped before the
prompt, since it would otherwise read the keystroke in our place. The header also
carries the same mark as a run title, with the same fallbacks when the terminal
cannot draw it.

Help and manuals: each verb shows its own options

The general help listed the verbs, then parked every option in one block at the
end: to learn what backup takes, you had to run backup help, and nothing said
so. Each verb now shows its own options, aligned and in a third colour. The
manuals follow with one option per line and its sentence (67 options, both
languages), the examples carry sudo, the meta/ section says what that
directory holds rather than what it is not, and SEE ALSO points to the programs
the tool actually runs — rsync, tar, zstd, age, rclone, systemd.

Install

git clone https://github.com/jotenakis2/backupsystemNG
cd backupsystemNG && sudo make install      # /usr/local/bin/{backupsystem,bsng}
sudo bsng init                              # write /etc/backupsystemNG
sudo bsng doctor                            # what works, what is missing

Arch: packaging/aur/PKGBUILD builds the package (or use the release asset
below as source). Dependencies are bash, coreutils, findutils, sed,
awk, grep, tar, zstd, rsync and util-linux; rclone for cloud
uploads, an MTA for mail.

What it does

rsync snapshots of a whole machine — not just files: package inventory, LVM and
RAID definitions, file capabilities, SELinux status, systemd units and cron
tables travel with each snapshot, and RESTORE.md walks the way back. No daemon,
no database: every snapshot is plain directories and a manifest, restorable with
bare rsync.

Assets

backupsystemNG-2.3.0.tar.gz is git archive of the tagged tree, prefixed with
the version, and its .sha256 sits next to it. The GitHub-generated "Source
code" archives differ byte for byte between downloads; use ours if you want a
checksum.

Full detail, including the gate and test work of this cycle, is in
CHANGELOG.md
(and CHANGELOG-fr.md).