borg/docs/misc/asciinema/entrypoint.sh
Thomas Waldmann 19f456d20d
new borg 1.4 demo screencast, recorded in a container
Backport of the borg2 demo automation to 1.4-maint, adapted to the borg 1.x
command syntax (borg init, repo::archive, no archive series / archive IDs,
no undelete).

record.sh builds borg from the git tag given by BORG_VERSION in a container
(podman or docker, see #8040), generates the demo data and records the whole
demo automatically - so re-recording it for a new release is one command.

The demo data is generated by demo-data.py: compressible, but not trivially
repetitive, so compression and deduplication show realistic numbers (#6303).

Removes the old borg 1.2 era Vagrant based install/basic/advanced scripts
and their casts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 01:05:25 +02:00

19 lines
736 B
Bash
Executable file

#!/bin/sh
# Record the borg 1.4 demo screencast. Runs inside the container, see README.rst.
set -eu
CAST=borg14-demo.cast # this is also the name record.exp gives to asciinema
# Always start from the same state, so that re-recording is reproducible.
rm -rf /media/backup/borgdemo /home/user/Documents /home/user/restore \
/home/user/.config/borg /home/user/.cache/borg
mkdir -p /media/backup/borgdemo
cp -a /opt/demo-data /home/user/Documents
chown -R user:user /home/user /media/backup
su - user -c "expect -f /demo/record.exp"
# The recording runs as user "user", which usually can not write to the bind
# mounted output directory, so copy the result over as root.
cp "/tmp/$CAST" "/out/$CAST"
echo "recorded: /out/$CAST"