Files
mcde/lib/McdeSys/Makefile.am
T
lotherkandClaude Opus 5.5 c8e8587f9b mcde: backup by BorgBackup to a disk of its own, with a watcher for space
McdeSys gets the backup (lib/McdeSys/backup.c): a partition becomes the
backup disk with an encrypted repository (borg init -e repokey-blake2);
every hour root's crontab runs dtbackup run: borg create of / (and /home)
on its own file systems, lz4, then prune -- 24 hourly, 30 daily, 52
weekly, every monthly unless set otherwise (keep_* in
/etc/mcde-backup.conf, -1 keeps every one) -- and compact.  The watcher:
before and after each run, while the backup disk has less than min_free
percent free (10 unless set), the oldest backup is deleted and the space
given back; the newest is never deleted.  Listing (borg list --json) and
restoring a path into a folder (borg extract).  The passphrase lives in
/etc/mcde-backup.pass, root's alone, handed over by BORG_PASSCOMMAND.
docs/reference/borg.txt from borg 1.4.5's own documentation.

dtbackup run | status | list: the same from a shell and for cron, no X.

Measured: builds on the Linux host and compiles in the build VM; as a
user dtbackup status says no disk is set up and dtbackup run refuses.
Not measured: a real backup -- borg is not on the host and goes into the
set with the next userland.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:49:38 +00:00

25 lines
935 B
Makefile

MAINTAINERCLEANFILES = Makefile.in
# McdeSys, MCDE's layer between the desktop and the operating system
# (include/Mcde/McdeSys.h): common.c is POSIX, one backend per system.
lib_LTLIBRARIES = libMcdeSys.la
libMcdeSys_la_CPPFLAGS = -I$(top_srcdir)/include
libMcdeSys_la_SOURCES = common.c net.c sound.c users.c share.c netmount.c backup.c private.h
if NETBSD
libMcdeSys_la_SOURCES += netbsd.c disk_netbsd.c
# crypt(3), for the password hash; proplib(3), for the battery; libdns_sd
# (base), for the computers on the network (netbsd.c)
libMcdeSys_la_LIBADD = -lcrypt -lprop -ldns_sd
else
libMcdeSys_la_SOURCES += linux.c disk_linux.c
endif
libMcdeSys_la_LDFLAGS = -version-info 1:0:0
# what the system tells about itself, for a look by hand: make check runs it
check_PROGRAMS = test_sysinfo
test_sysinfo_SOURCES = test_sysinfo.c
test_sysinfo_CPPFLAGS = -I$(top_srcdir)/include
test_sysinfo_LDADD = libMcdeSys.la
TESTS = test_sysinfo