Files
xavierandClaude Opus 5.5 17c9b04780 docs: Backrest tutorial with recorded demos and UI screenshots (demo/backrest)
- demo/backrest/README.md (fr) and README.en.md: a backup instance reading
  the data volume of another instance read-only, restic repository on its own
  volume, Backrest configured from the web UI, then restic on the command
  line and restoring a lost file
- install and restore scenarios recorded with autocast; restore configures
  Backrest through its configuration file (autoInitialize)
- UI screenshots made by screenshots.sh: a Debian instance with Chromium
  driven by Playwright fills in the forms
- demo/lib.sh: helpers shared by the tutorial preambles
- Docker tutorial: a filesystem volume can be shared by several instances,
  two Docker daemons must not share /var/lib/docker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018inUJkPw1qcoCubeKqfffm
2026-11-22 15:51:14 +01:00

21 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Screenshots of the Backrest web UI for the tutorial (demo/backrest/*.png), from
# the repository root: a backrest instance as at the end of the install demo, and
# a Debian instance with Chromium driven by Playwright. Everything is removed at
# the end. Prerequisites: LXD, mise, nothing named as in setup.sh, no "browser" instance.
set -euo pipefail
source demo/backrest/setup.sh ui
trap 'lxc delete --force browser >/dev/null 2>&1; demo_cleanup' EXIT
lxc launch images:debian/13 browser >/dev/null
until lxc exec browser -- test -e /run/systemd/resolve/stub-resolv.conf -o -s /etc/resolv.conf; do sleep 1; done
sleep 5
lxc exec browser -- sh -c 'apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq chromium nodejs npm fonts-dejavu >/dev/null 2>&1'
lxc exec browser -- sh -c 'mkdir -p /pw /shots && cd /pw && npm init -y >/dev/null && npm install --silent playwright-core@1.65.1'
lxc file push demo/backrest/screenshots.mjs browser/pw/screenshots.mjs >/dev/null
until curl --silent --output /dev/null "http://$(lxc list backrest --columns 4 --format csv | grep -o '^[0-9.]*'):9898/"; do sleep 1; done
lxc exec browser -- node /pw/screenshots.mjs "http://$(lxc list backrest --columns 4 --format csv | grep -o '^[0-9.]*'):9898/" /shots
for shot in settings repo plan plan-schedule backup snapshot; do
lxc file pull "browser/shots/$shot.png" "demo/backrest/$shot.png"
done