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
This commit is contained in:
1 parent
abd1f7f4b2
commit
8e7557865d
26 files changed
+2757
-20
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# Demo: restic on the command line in the backup instance, then restore a lost file of the app instance
|
||||
# (prerequisites: LXD, mise; everything created and configured if missing, then removed at the end)
|
||||
settings:
|
||||
width: 156
|
||||
height: 40
|
||||
type_speed: 35ms
|
||||
# Empty: the prompts are the shell's own (PS1), so that the instance's root shell keeps its own prompt
|
||||
prompt: ""
|
||||
timeout: 300s
|
||||
# bash without rc files: the real prompt (PS1) is used to detect the end of commands
|
||||
shell:
|
||||
program: bash
|
||||
args: [--norc, --noprofile]
|
||||
prompt: AUTOCAST_PROMPT
|
||||
line_split: " \\"
|
||||
quit_command: exit
|
||||
environment:
|
||||
- {name: PS1, value: "\\[\\e[1;34m\\]lxd\\[\\e[0m\\] > AUTOCAST_PROMPT"}
|
||||
- {name: PROMPT_COMMAND, value: "bind 'set enable-bracketed-paste off'"}
|
||||
- {name: TERM, value: xterm-256color}
|
||||
|
||||
instructions:
|
||||
- !Command {command: "source demo/backrest/setup.sh restore", hidden: true}
|
||||
- !Marker Restic
|
||||
- !Command {command: "# restic is available in the backup instance, next to Backrest"}
|
||||
- !Command {command: "lxc shell backrest"}
|
||||
- !Command {command: "export RESTIC_REPOSITORY=/backups/restic RESTIC_PASSWORD=demo-repo-password"}
|
||||
- !Command {command: "restic snapshots"}
|
||||
- !Wait 2s
|
||||
- !Command {command: "restic ls latest /backup/app-data --recursive | head -12"}
|
||||
- !Wait 2s
|
||||
- !Command {command: "restic stats latest"}
|
||||
- !Command {command: "exit"}
|
||||
- !Wait 3s
|
||||
- !Clear
|
||||
- !Marker Restore
|
||||
- !Command {command: "# Oops: a file of the app instance is lost"}
|
||||
- !Command {command: "lxc exec app -- rm /srv/app/notes.txt"}
|
||||
- !Command {command: "lxc exec app -- cat /srv/app/notes.txt"}
|
||||
- !Command {command: "# restic dump writes it from the latest snapshot, lxc file push puts it back"}
|
||||
- !Command {command: "lxc exec backrest --env RESTIC_PASSWORD=demo-repo-password -- restic --repo /backups/restic dump latest /backup/app-data/notes.txt | lxc file push --uid 0 --gid 0 --mode 0644 - app/srv/app/notes.txt"}
|
||||
- !Command {command: "lxc exec app -- cat /srv/app/notes.txt"}
|
||||
- !Wait 6s
|
||||
- !Command {command: "demo_cleanup", hidden: true}
|
||||
Reference in new issue
Block a user