LBU(8)
πΎ lbu β LBU(8) β local backup overlays but make it cute πΎ
okay bestie, welcome to the LBU(8) system manager's manual page for lbu, and it is literally the group chat for local backups on diskless Alpine Linux systems. Think of it as the friend who keeps your overlays together, remembers what's in and out, packs up apkovl archives, commits them to removable media or a backup directory, and can compare or revert saved overlays without breaking a sweat. π
πΈ NAME πΈ
lbu β manage local backups for diskless Alpine Linux systems.
β¨ SYNOPSIS β¨
lbu SUBCOMMAND [OPTIONS] [ARGS]
π¦ DESCRIPTION π¦
okay so lbu manages Alpine local backup overlays. It tracks files to include or exclude, creates apkovl archives, commits them to removable media or a backup directory, and compares or reverts saved overlays. No cap.
The default file set is provided by the apk backup audit. Additional include and exclude entries are stored in the lbu protected paths file. Included entries use a leading +. Excluded entries use a leading -. That's the whole vibe check: plus means include, minus means exclude. π
π SUBCOMMANDS π
include, inc, add
include,inc,add [-rv] FILE...β adds files to the include list. Leading/characters are stripped before entries are stored.include,inc,add [-v] -lβ lists files in the include list. Iconic. β¨
exclude, ex, delete
exclude,ex,delete [-rv] FILE...β adds files to the exclude list. If a file is present in the include list, it is removed from there. Bye bestie. πexclude,ex,delete [-v] -lβ lists files in the exclude list.
list, ls
list,lsβ lists files that would be written to an apkovl archive.
package, pkg
package,pkg [-v] [DIR | FILE]β creates an apkovl archive. IfDIRis specified, the archive is written there using the default apkovl filename. IfFILEis specified and is not a directory, that filename is used. With no argument, the archive is written to the current directory.
commit, ci
commit,ci [-denv] [-p PASSWORD] [MEDIA]β creates an apkovl archive and saves it to writable media or$LBU_BACKUPDIR. IfMEDIAis not specified,LBU_BACKUPDIRorLBU_MEDIAis used. IfLBU_BACKUPDIRis set, no media is mounted. Main character energy: it just uses the backup dir and skips mounting. π«Ά
list-backup, lb
list-backup,lb [MEDIA]β lists timestamped backup archives fromMEDIAor$LBU_BACKUPDIR.
revert
revert REVISION [MEDIA]β replaces the current apkovl archive withREVISION. The current archive is backed up before the revision is moved into place.
heads up: that backup-before-move detail is the safety bubble. π«§
status, stat, st
status,stat,st [-av]β shows changes compared with the last committed apkovl. Output is prefixed with"A"for added files,"D"for deleted files, and"U"for updated files.
diff
diff [MEDIA]β runs a recursive diff between the last committed apkovl and the current file set.
π OPTIONS π
-aβ forstatus, compare all backup-tracked files instead of comparing with the last committed apkovl.-dβ forcommit, remove old apkovl files before writing the new archive.-eβ enable encryption. If no cipher is configured,DEFAULT_CIPHERis used.-hβ display help for the selected subcommand.-lβ forincludeorexclude, list entries instead of changing them.-nβ forcommit, perform a dry run and show what would be committed.-p PASSWORDβ usePASSWORDfor encryption.-qβ quiet mode.-rβ forincludeorexclude, remove files from the selected list.-vβ verbose mode.
π CONFIGURATION π
Configuration is read from /etc/lbu/lbu.conf. Slay.
DEFAULT_CIPHERβ cipher used when-eenables encryption. The default isaes-256-cbc.ENCRYPTIONβ encrypt archives with this cipher by default.PASSWORDβ password used for encryption and decryption.LBU_MEDIAβ default media name for commands that need backup media. Common values areusbandfloppy.LBU_BACKUPDIRβ directory where apkovl archives are stored. When set,lbudoes not mount backup media.BACKUP_LIMITβ number of timestamped previous apkovl archives to keep aftercommit.
π§ HOOKS π§
Executable scripts in /etc/lbu/pre-package.d are run before package creation. Executable scripts in /etc/lbu/post-package.d are run after package creation. It's giving before-and-after glow-up. β¨
π EXAMPLES π
Add files to the include list:
lbu include /root/.ssh
Exclude a file from backups:
lbu exclude /etc/motd
Create an apkovl archive in the current directory:
lbu package
Commit to the configured backup directory or media:
lbu commit
Commit to USB media and remove old apkovl files first:
lbu commit -d usb
Show changes compared with the last commit:
lbu status
π EXIT STATUS π
0β Success.- non-zero β An error occurred.
π FILES π
/etc/lbu/lbu.confβ Configuration file./etc/lbu/pre-package.dβ Directory for scripts run before package creation./etc/lbu/post-package.dβ Directory for scripts run after package creation./etc/apk/protected_paths.d/lbu.listβ Include and exclude list maintained bylbu./media/MEDIA/HOSTNAME.apkovl.tar.gzβ Default archive path when committing to media.
π«Ά SEE ALSO π«Ά
apk(8), setup-alpine(8), setup-disk(8), setup-lbu(8). Go read them, bestie. π
π AUTHORS π
Natanael Copa <ncopa@alpinelinux.org> and others. Legends.
β xoxo π source/version: Alpine Linux, date: 2026-06-09, and this was LBU(8). Byeee π«Ά
π¦ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms