LBU(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’Ύ 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. If DIR is specified, the archive is written there using the default apkovl filename. If FILE is 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. If MEDIA is not specified, LBU_BACKUPDIR or LBU_MEDIA is used. If LBU_BACKUPDIR is 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 from MEDIA or $LBU_BACKUPDIR.

revert

  • revert REVISION [MEDIA] β€” replaces the current apkovl archive with REVISION. 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 β€” for status, compare all backup-tracked files instead of comparing with the last committed apkovl.
  • -d β€” for commit, remove old apkovl files before writing the new archive.
  • -e β€” enable encryption. If no cipher is configured, DEFAULT_CIPHER is used.
  • -h β€” display help for the selected subcommand.
  • -l β€” for include or exclude, list entries instead of changing them.
  • -n β€” for commit, perform a dry run and show what would be committed.
  • -p PASSWORD β€” use PASSWORD for encryption.
  • -q β€” quiet mode.
  • -r β€” for include or exclude, remove files from the selected list.
  • -v β€” verbose mode.

πŸ“ CONFIGURATION πŸ“

Configuration is read from /etc/lbu/lbu.conf. Slay.

  • DEFAULT_CIPHER β€” cipher used when -e enables encryption. The default is aes-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 are usb and floppy.
  • LBU_BACKUPDIR β€” directory where apkovl archives are stored. When set, lbu does not mount backup media.
  • BACKUP_LIMIT β€” number of timestamped previous apkovl archives to keep after commit.

🧚 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 by lbu.
  • /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