Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cd92707d7 | ||
|
|
8f5255f36c | ||
|
|
b8b847fe68 | ||
|
|
ef76fb8fec | ||
|
|
200160976e | ||
|
|
17c9b04780 | ||
|
|
296d45e295 | ||
|
|
abd1f7f4b2 | ||
|
|
f278c14bcb | ||
|
|
d33ee6d84f | ||
|
|
be68264e5c |
No files matched your search
@@ -18,6 +18,8 @@ This repository contains a collection of LXD profiles and network configurations
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](demo/lxc.cast)</sub>
|
||||
|
||||
### Tour of the mise tasks
|
||||
|
||||
Welcome message when entering the directory, profile list with their state in
|
||||
@@ -25,6 +27,8 @@ LXD, profile content and diff between LXD and the repository.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](demo/tour.cast)</sub>
|
||||
|
||||
### Install, update and import a profile
|
||||
|
||||
A profile is installed, then changed directly in LXD: installing it again shows
|
||||
@@ -33,12 +37,17 @@ repository instead.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](demo/install.cast)</sub>
|
||||
|
||||
## Tutorials
|
||||
|
||||
Step-by-step use cases, from the clone of the repository to a ready instance:
|
||||
|
||||
- [Docker in an LXD container](demo/docker/README.en.md): install the
|
||||
`docker-unprivileged` profile, launch an instance and use Docker.
|
||||
- [Back up your LXD instances with Backrest](demo/backrest/README.en.md): a
|
||||
backup instance reading the volumes of the others read-only, configured from
|
||||
the web UI, then restic on the command line.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ le déploiement et la gestion de conteneurs LXD.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](demo/lxc.cast)</sub>
|
||||
|
||||
### Tour des tâches mise
|
||||
|
||||
Message d'accueil à l'entrée dans le dossier, liste des profils avec leur état
|
||||
@@ -26,6 +28,8 @@ dans LXD, contenu d'un profil et différences entre LXD et le dépôt.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](demo/tour.cast)</sub>
|
||||
|
||||
### Installer, mettre à jour et importer un profil
|
||||
|
||||
Un profil est installé, puis modifié directement dans LXD : le réinstaller
|
||||
@@ -34,12 +38,17 @@ la modification dans le dépôt.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](demo/install.cast)</sub>
|
||||
|
||||
## Tutoriels
|
||||
|
||||
Des cas d'usage pas à pas, du clone du dépôt à une instance prête à servir :
|
||||
|
||||
- [Docker dans un conteneur LXD](demo/docker/README.md) : installer le profil
|
||||
`docker-unprivileged`, lancer une instance et utiliser Docker.
|
||||
- [Sauvegarder ses instances LXD avec Backrest](demo/backrest/README.md) : une
|
||||
instance de sauvegarde qui lit les volumes des autres en lecture seule,
|
||||
configurée depuis l'interface web, puis restic en ligne de commande.
|
||||
|
||||
## Utilisation
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ The `.cast` files can be played in Gitea's file view (asciinema player).
|
||||
| `install.yaml` | `install`, diff and confirmation after a change in LXD, `import` | LXD, profile `unattended-upgrades` not installed |
|
||||
| `docker/install.yaml` | [Docker tutorial](docker/README.en.md): clone the repository, install the `docker-unprivileged` profile, launch an instance and follow cloud-init | LXD, mise, no instance `docker` nor profile `docker-unprivileged` |
|
||||
| `docker/usage.yaml` | [Docker tutorial](docker/README.en.md): `lxc exec`, then `lxc shell` and Docker commands in the instance | LXD, mise |
|
||||
| `backrest/install.yaml` | [Backrest tutorial](backrest/README.en.md): `app-backrest` profile, volumes, backup instance | LXD, mise, no `backrest` nor `app` instance, no `backups` nor `app-data` volume, no `app-backrest` profile |
|
||||
| `backrest/restore.yaml` | [Backrest tutorial](backrest/README.en.md): restic on the command line, restoring a file | LXD, mise |
|
||||
|
||||
## Recording a demo
|
||||
|
||||
@@ -35,13 +37,17 @@ into the repository); their hidden epilogue restores the repository file as it
|
||||
was and deletes the profile. These scenarios refuse to start if that profile is
|
||||
already installed.
|
||||
|
||||
The scenarios of a tutorial live in a subdirectory (`docker/`), with their own
|
||||
`setup.sh` preamble: it creates or checks what the scenario needs (instance,
|
||||
The scenarios of a tutorial live in a subdirectory (`docker/`, `backrest/`),
|
||||
with their own `setup.sh` preamble (shared functions in `lib.sh`): it creates or checks what the scenario needs (instance,
|
||||
profile, clone of the repository in a temporary directory), and its epilogue
|
||||
removes what the demo created. These scenarios let the shell display its own
|
||||
prompt (`prompt: ""` for autocast), so that the instance root shell opened by
|
||||
`lxc shell` keeps its own.
|
||||
|
||||
Web UI screenshots (`backrest/*.png`) are made by `backrest/screenshots.sh`: a
|
||||
Debian instance with Chromium, driven by Playwright (`screenshots.mjs`), fills
|
||||
in the UI forms; everything is removed at the end.
|
||||
|
||||
`castfix.py` touches up each recording: it puts back the shell prompt that
|
||||
autocast drops (at the start and after a `!Clear`) and speeds up the progress
|
||||
dots of `cloud-init status --wait`.
|
||||
|
||||
@@ -18,6 +18,8 @@ Les fichiers `.cast` se lisent dans la vue fichier de Gitea (lecteur asciinema).
|
||||
| `install.yaml` | `install`, diff et confirmation après une modification dans LXD, `import` | LXD, profil `unattended-upgrades` non installé |
|
||||
| `docker/install.yaml` | [tutoriel Docker](docker/README.md) : clone du dépôt, installation du profil `docker-unprivileged`, lancement d'une instance et suivi de cloud-init | LXD, mise, ni instance `docker` ni profil `docker-unprivileged` |
|
||||
| `docker/usage.yaml` | [tutoriel Docker](docker/README.md) : `lxc exec`, puis `lxc shell` et commandes Docker dans l'instance | LXD, mise |
|
||||
| `backrest/install.yaml` | [tutoriel Backrest](backrest/README.md) : profil `app-backrest`, volumes, instance de sauvegarde | LXD, mise, ni instances `backrest` et `app`, ni volumes `backups` et `app-data`, ni profil `app-backrest` |
|
||||
| `backrest/restore.yaml` | [tutoriel Backrest](backrest/README.md) : restic en ligne de commande, restauration d'un fichier | LXD, mise |
|
||||
|
||||
## Enregistrer une démo
|
||||
|
||||
@@ -35,13 +37,19 @@ dans le dépôt) ; leur épilogue masqué remet le fichier du dépôt dans son
|
||||
d'origine et supprime le profil. Ces scénarios refusent de démarrer si ce
|
||||
profil est déjà installé.
|
||||
|
||||
Les scénarios d'un tutoriel sont rangés dans un sous-dossier (`docker/`), avec
|
||||
leur propre préambule `setup.sh` : il crée ou vérifie ce dont le scénario a
|
||||
Les scénarios d'un tutoriel sont rangés dans un sous-dossier (`docker/`,
|
||||
`backrest/`), avec leur propre préambule `setup.sh` (fonctions communes dans
|
||||
`lib.sh`) : il crée ou vérifie ce dont le scénario a
|
||||
besoin (instance, profil, clone du dépôt dans un dossier temporaire) et son
|
||||
épilogue supprime ce que la démo a créé. Ces scénarios laissent le shell
|
||||
afficher lui-même son prompt (`prompt: ""` côté autocast), pour que le shell
|
||||
root de l'instance ouvert par `lxc shell` garde le sien.
|
||||
|
||||
Les captures d'écran d'une interface web (`backrest/*.png`) sont produites par
|
||||
`backrest/screenshots.sh` : une instance Debian avec Chromium, pilotée par
|
||||
Playwright (`screenshots.mjs`), remplit les formulaires de l'interface ; tout
|
||||
est supprimé à la fin.
|
||||
|
||||
`castfix.py` retouche chaque enregistrement : il remet le prompt du shell que
|
||||
autocast efface (au début et après un `!Clear`) et accélère les points de
|
||||
progression de `cloud-init status --wait`.
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
# Back up your LXD instances with Backrest
|
||||
|
||||
🇫🇷 [Lire en français](README.md)
|
||||
|
||||
Your LXD instances are running, their data lives in volumes… what about
|
||||
backups? [restic](https://restic.net) is a great backup tool: deduplicated,
|
||||
encrypted, able to write to a local disk, an SFTP server or S3 storage.
|
||||
[Backrest](https://github.com/garethgeorge/backrest) adds a web UI on top of
|
||||
it: scheduling, retention, history and snapshot browsing, restore in a few
|
||||
clicks.
|
||||
|
||||
This tutorial sets up a dedicated **backup instance**. It reads the data of
|
||||
another instance through a volume mounted **read-only**, and backs it up to a
|
||||
restic repository stored on a separate volume. The application has nothing to
|
||||
install, and the backup instance cannot damage what it backs up.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
app["app instance"] -- "read/write<br>/srv/app" --> data[("app-data volume<br>data to protect")]
|
||||
backrest["backrest instance<br>Backrest + restic"] -- "read-only<br>/backup/app-data" --> data
|
||||
backrest -- "write<br>/backups" --> backups[("backups volume<br>restic repository")]
|
||||
```
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](install.cast)</sub>
|
||||
|
||||
## What you need
|
||||
|
||||
The same prerequisites as the [Docker tutorial](../docker/README.en.md#what-you-need):
|
||||
|
||||
- **LXD** installed and initialized (`lxc list` answers without error);
|
||||
- **[mise](https://mise.jdx.dev)**, and this repository cloned and trusted
|
||||
(`mise trust`), see [Get the repository](../docker/README.en.md#1-get-the-repository);
|
||||
- **internet access** from the instances (Ubuntu packages, GitHub to download
|
||||
Backrest and restic);
|
||||
- a **browser** that reaches the instances (on the host, that is the case by
|
||||
default: the `lxdbr0` bridge is routed);
|
||||
- room on a storage pool for the backup repository.
|
||||
|
||||
From here on, the data to protect is that of an `app` instance, in an
|
||||
`app-data` volume mounted on `/srv/app`. Replace it with yours. To follow the
|
||||
tutorial as is, create it:
|
||||
|
||||
```shell
|
||||
lxc storage volume create default app-data size=5GiB
|
||||
lxc launch ubuntu:lts app
|
||||
lxc storage volume attach default app-data app /srv/app
|
||||
lxc exec app -- sh -c 'echo "Hello from app" > /srv/app/notes.txt'
|
||||
```
|
||||
|
||||
## 1. The `app-backrest` profile
|
||||
|
||||
```shell
|
||||
mise run show app-backrest
|
||||
```
|
||||
|
||||
The profile only holds cloud-init:
|
||||
|
||||
- a `backrest` systemd service, listening on port **9898** of the instance,
|
||||
with its configuration in `/etc/backrest/config.json` and its data in
|
||||
`/var/lib/backrest`;
|
||||
- at first boot, the download of the latest Backrest release from GitHub, then
|
||||
the start of the service;
|
||||
- Backrest downloads by itself the restic version it needs, and the profile
|
||||
makes it available on the command line (`/usr/local/bin/restic`) for
|
||||
restores and manual checks.
|
||||
|
||||
The service runs as `root` in the instance, to read every file of the mounted
|
||||
volumes, whoever owns them. As the instance is unprivileged, that root has no
|
||||
rights on the host.
|
||||
|
||||
```shell
|
||||
mise run install app-backrest
|
||||
```
|
||||
|
||||
## 2. The volumes
|
||||
|
||||
The restic repository has its own volume: it outlives the backup instance, and
|
||||
can live on another pool, ideally another disk than the data.
|
||||
|
||||
```shell
|
||||
lxc storage volume create default backups size=20GiB
|
||||
```
|
||||
|
||||
`lxc storage volume list` shows the volumes and how many instances use them:
|
||||
|
||||
```shell
|
||||
lxc storage volume list default type=custom --columns nu
|
||||
```
|
||||
|
||||
## 3. The backup instance
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts backrest --profile default --profile app-backrest
|
||||
lxc config device add backrest backups disk pool=default source=backups path=/backups
|
||||
lxc config device add backrest app-data disk pool=default source=app-data path=/backup/app-data readonly=true
|
||||
```
|
||||
|
||||
- `backups` is mounted read/write on `/backups`: the restic repository will
|
||||
live there;
|
||||
- `app-data` is mounted **read-only** (`readonly=true`) on `/backup/app-data`.
|
||||
A filesystem volume can be attached to several instances at once: `app`
|
||||
keeps writing to it, `backrest` reads it.
|
||||
|
||||
Devices are hot-plugged, no need to restart the instance. Wait for the end of
|
||||
the installation, then check the service:
|
||||
|
||||
```shell
|
||||
lxc exec backrest -- cloud-init status --wait --long
|
||||
lxc exec backrest -- systemctl is-active backrest
|
||||
lxc list backrest --columns ns4
|
||||
```
|
||||
|
||||
The web UI answers on `http://<IPv4 address of the instance>:9898`.
|
||||
|
||||
> [!TIP]
|
||||
> The read-only mounts of this repository follow this pattern:
|
||||
> `volume-gitea-data-ro` and `volume-nextcloud-data-ro` mount the Gitea and
|
||||
> Nextcloud data volumes under `/backup/`. For your own applications, one
|
||||
> profile per backed up volume saves typing these commands. As for the
|
||||
> `docker-volume-data` profile of the Docker tutorial, adapt the pool to your
|
||||
> setup ([see how](../docker/README.en.md#adapt-an-installed-profile-to-your-needs)).
|
||||
|
||||
## 4. Configure Backrest
|
||||
|
||||
Everything happens in the web UI.
|
||||
|
||||
### First run
|
||||
|
||||
Backrest asks for an **instance ID** (it shows in the snapshots and cannot be
|
||||
changed afterwards) and an administrator account. Disabling authentication is
|
||||
possible, but not advised as soon as the UI is reachable from the network.
|
||||
|
||||

|
||||
|
||||
### The repository
|
||||
|
||||
**Add Repo**: a name (`local`), the repository URI (`/backups/restic`, on the
|
||||
`backups` volume) and a password. **The password encrypts the repository:
|
||||
without it, the backups cannot be read.** Keep a copy of it outside the
|
||||
instance.
|
||||
|
||||
Backrest initializes the restic repository on submit. The next tabs schedule
|
||||
the repository maintenance: `prune` (reclaim the space of forgotten snapshots)
|
||||
and `check` (verify its integrity).
|
||||
|
||||

|
||||
|
||||
The URI can also point to remote storage (`s3:…`, `sftp:…`, `rclone:…`): the
|
||||
best protection against losing the host disk.
|
||||
|
||||
### The backup plan
|
||||
|
||||
**Add Plan**: a name (`app-data`), the repository and the path(s) to back up
|
||||
(`/backup/app-data`)…
|
||||
|
||||

|
||||
|
||||
… the schedule (here every day at 3am, cron expression `0 3 * * *`) and the
|
||||
retention: how many snapshots to keep per hour, day, month…
|
||||
|
||||

|
||||
|
||||
### First backup
|
||||
|
||||
On the plan page, **Backup Now** runs a backup without waiting for the
|
||||
schedule. The history shows every operation, the next scheduled backup and the
|
||||
details of the snapshots:
|
||||
|
||||

|
||||
|
||||
The **Snapshot Browser** walks through the content of a snapshot. The `…` menu
|
||||
of each file or directory restores it, or downloads it.
|
||||
|
||||

|
||||
|
||||
## 5. restic on the command line, and restoring a file
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](restore.cast)</sub>
|
||||
|
||||
restic is available in the backup instance, next to Backrest. Backrest
|
||||
snapshots are regular restic snapshots, tagged with the plan name:
|
||||
|
||||
```shell
|
||||
lxc shell backrest
|
||||
```
|
||||
|
||||
```shell
|
||||
export RESTIC_REPOSITORY=/backups/restic RESTIC_PASSWORD=<repository password>
|
||||
restic snapshots # list of snapshots
|
||||
restic ls latest /backup/app-data --recursive # content of the latest
|
||||
restic stats latest # size
|
||||
exit
|
||||
```
|
||||
|
||||
To put a lost file back in the `app` instance, `restic dump` writes the file
|
||||
taken from a snapshot to its standard output, and `lxc file push` drops it in
|
||||
the instance:
|
||||
|
||||
```shell
|
||||
lxc exec backrest --env RESTIC_PASSWORD=<repository 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
|
||||
```
|
||||
|
||||
As the `app-data` volume is read-only for Backrest, it cannot restore in place.
|
||||
To restore a whole directory, restore it into a directory of the backup
|
||||
instance (from the UI: *Restore to path*, or
|
||||
`restic restore latest --target /backups/restore`), then transfer it, or
|
||||
attach the volume read/write for the time of the restore.
|
||||
|
||||
## Going further
|
||||
|
||||
- **Reach the UI from the network.** A `proxy` device publishes port 9898 on
|
||||
the host:
|
||||
|
||||
```shell
|
||||
lxc config device add backrest web proxy listen=tcp:0.0.0.0:9898 connect=tcp:127.0.0.1:9898
|
||||
```
|
||||
- **Protect the repository too.** The `backups` volume can have its own LXD
|
||||
snapshots (`snapshots.schedule`, see the
|
||||
[Docker tutorial](../docker/README.en.md#keep-docker-data-in-a-volume-with-automatic-snapshots)),
|
||||
and a second plan can back up the same data to a remote repository (S3,
|
||||
SFTP…).
|
||||
- **Back up other instances.** One read-only device per volume, one plan per
|
||||
volume: a single backup instance is enough for a whole host.
|
||||
- **Clean up.**
|
||||
|
||||
```shell
|
||||
lxc delete --force backrest app
|
||||
lxc storage volume delete default backups # the backup repository!
|
||||
lxc storage volume delete default app-data
|
||||
lxc profile delete app-backrest
|
||||
```
|
||||
|
||||
## Replaying the demos and screenshots
|
||||
|
||||
The animations of this page are recorded from the `install.yaml` and
|
||||
`restore.yaml` scenarios (see [how the demos are made](../README.en.md)), the
|
||||
UI screenshots with `screenshots.sh`: a Debian instance with Chromium, driven
|
||||
by [Playwright](https://playwright.dev) (`screenshots.mjs`), fills in the
|
||||
forms as described above.
|
||||
|
||||
```shell
|
||||
MISE_ENV=demo mise run demo backrest/install
|
||||
MISE_ENV=demo mise run demo backrest/restore
|
||||
demo/backrest/screenshots.sh
|
||||
```
|
||||
|
||||
They create the `backrest` and `app` instances, the `backups` and `app-data`
|
||||
volumes and the `app-backrest` profile, then remove them at the end.
|
||||
`restore.yaml` configures Backrest through its configuration file rather than
|
||||
the UI. In the animation, the cloud-init wait is sped up.
|
||||
@@ -0,0 +1,265 @@
|
||||
# Sauvegarder ses instances LXD avec Backrest
|
||||
|
||||
🇬🇧 [Read in English](README.en.md)
|
||||
|
||||
Vos instances LXD tournent, leurs données vivent dans des volumes… et les
|
||||
sauvegardes ? [restic](https://restic.net) est un excellent outil de
|
||||
sauvegarde : dédupliqué, chiffré, capable d'écrire sur un disque local, un
|
||||
serveur SFTP ou un stockage S3. [Backrest](https://github.com/garethgeorge/backrest)
|
||||
lui ajoute une interface web : planification, rétention, historique et
|
||||
navigation dans les snapshots, restauration en quelques clics.
|
||||
|
||||
Ce tutoriel met en place une **instance de sauvegarde** dédiée. Elle lit les
|
||||
données d'une autre instance à travers un volume monté **en lecture seule** et
|
||||
les sauvegarde dans un dépôt restic posé sur un volume à part. L'application
|
||||
n'a rien à installer, et l'instance de sauvegarde ne peut pas abîmer ce
|
||||
qu'elle sauvegarde.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
app["instance app"] -- "lecture/écriture<br>/srv/app" --> data[("volume app-data<br>données à protéger")]
|
||||
backrest["instance backrest<br>Backrest + restic"] -- "lecture seule<br>/backup/app-data" --> data
|
||||
backrest -- "écriture<br>/backups" --> backups[("volume backups<br>dépôt restic")]
|
||||
```
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](install.cast)</sub>
|
||||
|
||||
## Ce qu'il vous faut
|
||||
|
||||
Les mêmes prérequis que pour le [tutoriel Docker](../docker/README.md#ce-quil-vous-faut) :
|
||||
|
||||
- **LXD** installé et initialisé (`lxc list` répond sans erreur) ;
|
||||
- **[mise](https://mise.jdx.dev)** et ce dépôt cloné et approuvé
|
||||
(`mise trust`), voir [Récupérer le dépôt](../docker/README.md#1-récupérer-le-dépôt) ;
|
||||
- un **accès à internet** depuis les instances (paquets Ubuntu, GitHub pour
|
||||
télécharger Backrest et restic) ;
|
||||
- un **navigateur** qui atteint les instances (sur la machine hôte, c'est le
|
||||
cas par défaut : le bridge `lxdbr0` est routé) ;
|
||||
- de la place sur un pool de stockage pour le dépôt de sauvegarde.
|
||||
|
||||
Dans la suite, les données à protéger sont celles d'une instance `app`, dans
|
||||
un volume `app-data` monté sur `/srv/app`. Remplacez-les par les vôtres. Pour
|
||||
suivre le tutoriel à l'identique, créez-les :
|
||||
|
||||
```shell
|
||||
lxc storage volume create default app-data size=5GiB
|
||||
lxc launch ubuntu:lts app
|
||||
lxc storage volume attach default app-data app /srv/app
|
||||
lxc exec app -- sh -c 'echo "Hello from app" > /srv/app/notes.txt'
|
||||
```
|
||||
|
||||
## 1. Le profil `app-backrest`
|
||||
|
||||
```shell
|
||||
mise run show app-backrest
|
||||
```
|
||||
|
||||
Le profil ne contient que du cloud-init :
|
||||
|
||||
- un service systemd `backrest`, qui écoute sur le port **9898** de
|
||||
l'instance, garde sa configuration dans `/etc/backrest/config.json` et ses
|
||||
données dans `/var/lib/backrest` ;
|
||||
- au premier démarrage, le téléchargement de la dernière version de Backrest
|
||||
depuis GitHub, puis le démarrage du service ;
|
||||
- Backrest télécharge lui-même la version de restic dont il a besoin, et le
|
||||
profil la rend disponible en ligne de commande (`/usr/local/bin/restic`) pour
|
||||
les restaurations et les vérifications à la main.
|
||||
|
||||
Le service tourne en `root` dans l'instance, pour lire tous les fichiers des
|
||||
volumes montés, quels que soient leurs propriétaires. Comme l'instance n'est
|
||||
pas privilégiée, ce root n'a aucun droit sur l'hôte.
|
||||
|
||||
```shell
|
||||
mise run install app-backrest
|
||||
```
|
||||
|
||||
## 2. Les volumes
|
||||
|
||||
Le dépôt restic a son propre volume : il survit à l'instance de sauvegarde, et
|
||||
on peut le placer sur un autre pool, idéalement un autre disque que les
|
||||
données.
|
||||
|
||||
```shell
|
||||
lxc storage volume create default backups size=20GiB
|
||||
```
|
||||
|
||||
`lxc storage volume list` montre les volumes et le nombre d'instances qui les
|
||||
utilisent :
|
||||
|
||||
```shell
|
||||
lxc storage volume list default type=custom --columns nu
|
||||
```
|
||||
|
||||
## 3. L'instance de sauvegarde
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts backrest --profile default --profile app-backrest
|
||||
lxc config device add backrest backups disk pool=default source=backups path=/backups
|
||||
lxc config device add backrest app-data disk pool=default source=app-data path=/backup/app-data readonly=true
|
||||
```
|
||||
|
||||
- `backups` est monté en lecture/écriture sur `/backups` : c'est là que vivra
|
||||
le dépôt restic ;
|
||||
- `app-data` est monté **en lecture seule** (`readonly=true`) sur
|
||||
`/backup/app-data`. Un volume de type système de fichiers peut être attaché
|
||||
à plusieurs instances à la fois : `app` continue d'y écrire, `backrest` le
|
||||
lit.
|
||||
|
||||
Les devices s'ajoutent à chaud, pas besoin de redémarrer l'instance. On attend
|
||||
la fin de l'installation, puis on vérifie le service :
|
||||
|
||||
```shell
|
||||
lxc exec backrest -- cloud-init status --wait --long
|
||||
lxc exec backrest -- systemctl is-active backrest
|
||||
lxc list backrest --columns ns4
|
||||
```
|
||||
|
||||
L'interface web répond sur `http://<adresse IPv4 de l'instance>:9898`.
|
||||
|
||||
> [!TIP]
|
||||
> Les montages en lecture seule de ce dépôt suivent ce modèle :
|
||||
> `volume-gitea-data-ro` et `volume-nextcloud-data-ro` montent les volumes de
|
||||
> données de Gitea et Nextcloud sous `/backup/`. Pour vos propres
|
||||
> applications, un profil par volume sauvegardé évite de retaper ces
|
||||
> commandes. Comme pour le profil `docker-volume-data` du tutoriel Docker,
|
||||
> adaptez le pool à votre installation
|
||||
> ([voir comment](../docker/README.md#adapter-un-profil-installé-à-son-besoin)).
|
||||
|
||||
## 4. Configurer Backrest
|
||||
|
||||
Tout se passe dans l'interface web.
|
||||
|
||||
### Premier démarrage
|
||||
|
||||
Backrest demande un **identifiant d'instance** (il apparaît dans les snapshots
|
||||
et ne se change plus ensuite) et un compte administrateur. Désactiver
|
||||
l'authentification est possible, mais déconseillé dès que l'interface est
|
||||
joignable depuis le réseau.
|
||||
|
||||

|
||||
|
||||
### Le dépôt
|
||||
|
||||
**Add Repo** : un nom (`local`), l'URI du dépôt (`/backups/restic`, sur le
|
||||
volume `backups`) et un mot de passe. **Le mot de passe chiffre le dépôt : sans
|
||||
lui, les sauvegardes sont illisibles.** Gardez-en une copie ailleurs que dans
|
||||
l'instance.
|
||||
|
||||
Backrest initialise le dépôt restic à la validation. Les onglets suivants
|
||||
programment la maintenance du dépôt : `prune` (récupérer la place des
|
||||
snapshots oubliés) et `check` (vérifier son intégrité).
|
||||
|
||||

|
||||
|
||||
L'URI peut aussi désigner un stockage distant (`s3:…`, `sftp:…`, `rclone:…`) :
|
||||
c'est la meilleure protection contre la perte du disque de l'hôte.
|
||||
|
||||
### Le plan de sauvegarde
|
||||
|
||||
**Add Plan** : un nom (`app-data`), le dépôt et le ou les chemins à
|
||||
sauvegarder (`/backup/app-data`)…
|
||||
|
||||

|
||||
|
||||
… la planification (ici, tous les jours à 3 h, expression cron `0 3 * * *`) et
|
||||
la rétention : combien de snapshots garder par heure, jour, mois…
|
||||
|
||||

|
||||
|
||||
### Première sauvegarde
|
||||
|
||||
Sur la page du plan, **Backup Now** lance une sauvegarde sans attendre la
|
||||
planification. L'historique montre chaque opération, la prochaine sauvegarde
|
||||
programmée et le détail des snapshots :
|
||||
|
||||

|
||||
|
||||
Le **Snapshot Browser** parcourt le contenu d'un snapshot. Le menu `…` de
|
||||
chaque fichier ou dossier permet de le restaurer, ou de le télécharger.
|
||||
|
||||

|
||||
|
||||
## 5. restic en ligne de commande, et restaurer un fichier
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](restore.cast)</sub>
|
||||
|
||||
restic est disponible dans l'instance de sauvegarde, à côté de Backrest. Les
|
||||
snapshots de Backrest sont des snapshots restic ordinaires, étiquetés avec le
|
||||
nom du plan :
|
||||
|
||||
```shell
|
||||
lxc shell backrest
|
||||
```
|
||||
|
||||
```shell
|
||||
export RESTIC_REPOSITORY=/backups/restic RESTIC_PASSWORD=<mot de passe du dépôt>
|
||||
restic snapshots # liste des snapshots
|
||||
restic ls latest /backup/app-data --recursive # contenu du dernier
|
||||
restic stats latest # taille
|
||||
exit
|
||||
```
|
||||
|
||||
Pour remettre un fichier perdu en place dans l'instance `app`, `restic dump`
|
||||
écrit le fichier tiré d'un snapshot sur sa sortie standard, et
|
||||
`lxc file push` le dépose dans l'instance :
|
||||
|
||||
```shell
|
||||
lxc exec backrest --env RESTIC_PASSWORD=<mot de passe du dépôt> -- \
|
||||
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
|
||||
```
|
||||
|
||||
Comme le volume `app-data` est en lecture seule pour Backrest, il ne peut pas
|
||||
restaurer directement à sa place. Pour restaurer un dossier entier, on
|
||||
restaure dans un dossier de l'instance de sauvegarde (depuis l'interface :
|
||||
*Restore to path*, ou `restic restore latest --target /backups/restore`), puis
|
||||
on le transfère, ou on attache le volume en écriture le temps de la
|
||||
restauration.
|
||||
|
||||
## Pour aller plus loin
|
||||
|
||||
- **Accéder à l'interface depuis le réseau.** Un device `proxy` publie le port
|
||||
9898 sur l'hôte :
|
||||
|
||||
```shell
|
||||
lxc config device add backrest web proxy listen=tcp:0.0.0.0:9898 connect=tcp:127.0.0.1:9898
|
||||
```
|
||||
- **Protéger aussi le dépôt.** Le volume `backups` peut avoir ses propres
|
||||
snapshots LXD (`snapshots.schedule`, voir le
|
||||
[tutoriel Docker](../docker/README.md#garder-les-données-docker-dans-un-volume-avec-des-snapshots-automatiques)),
|
||||
et un second plan peut sauvegarder les mêmes données vers un dépôt distant
|
||||
(S3, SFTP…).
|
||||
- **Sauvegarder d'autres instances.** Un device en lecture seule par volume,
|
||||
un plan par volume : une seule instance de sauvegarde suffit pour tout un
|
||||
hôte.
|
||||
- **Faire le ménage.**
|
||||
|
||||
```shell
|
||||
lxc delete --force backrest app
|
||||
lxc storage volume delete default backups # le dépôt de sauvegarde !
|
||||
lxc storage volume delete default app-data
|
||||
lxc profile delete app-backrest
|
||||
```
|
||||
|
||||
## Rejouer les démos et les captures
|
||||
|
||||
Les animations de cette page sont enregistrées à partir des scénarios
|
||||
`install.yaml` et `restore.yaml` (voir [comment sont produites les démos](../README.md)),
|
||||
les captures de l'interface avec `screenshots.sh` : une instance Debian avec
|
||||
Chromium, pilotée par [Playwright](https://playwright.dev) (`screenshots.mjs`),
|
||||
remplit les formulaires comme décrit plus haut.
|
||||
|
||||
```shell
|
||||
MISE_ENV=demo mise run demo backrest/install
|
||||
MISE_ENV=demo mise run demo backrest/restore
|
||||
demo/backrest/screenshots.sh
|
||||
```
|
||||
|
||||
Ils créent les instances `backrest` et `app`, les volumes `backups` et
|
||||
`app-data` et le profil `app-backrest`, puis les suppriment à la fin.
|
||||
`restore.yaml` configure Backrest par son fichier de configuration plutôt que
|
||||
par l'interface. Dans l'animation, l'attente de cloud-init est accélérée.
|
||||
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 684 KiB |
@@ -0,0 +1,51 @@
|
||||
# Demo: a backup instance with Backrest, reading the data of another instance through a read-only volume
|
||||
# (prerequisites: LXD, mise, no instance backrest nor app, no profile app-backrest, no volume backups nor app-data;
|
||||
# all created, then removed at the end)
|
||||
settings:
|
||||
width: 156
|
||||
height: 50
|
||||
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 install", hidden: true}
|
||||
- !Marker Profile
|
||||
- !Command {command: "# The Backrest profile: a systemd service, Backrest and restic downloaded at first boot"}
|
||||
- !Command {command: "mise run show app-backrest"}
|
||||
- !Wait 5s
|
||||
- !Command {command: "mise run install app-backrest"}
|
||||
- !Wait 2s
|
||||
- !Clear
|
||||
- !Marker Volumes
|
||||
- !Command {command: "# The data to protect: the app-data volume of the app instance"}
|
||||
- !Command {command: "lxc storage volume list default type=custom --columns nu"}
|
||||
- !Command {command: "lxc exec app -- ls /srv/app"}
|
||||
- !Wait 2s
|
||||
- !Command {command: "# A dedicated volume for the restic repository"}
|
||||
- !Command {command: "lxc storage volume create default backups size=20GiB"}
|
||||
- !Wait 2s
|
||||
- !Clear
|
||||
- !Marker Launch
|
||||
- !Command {command: "# The backup instance: the repository volume, and the data volume read-only"}
|
||||
- !Command {command: "lxc launch ubuntu:lts backrest --profile default --profile app-backrest"}
|
||||
- !Command {command: "lxc config device add backrest backups disk pool=default source=backups path=/backups"}
|
||||
- !Command {command: "lxc config device add backrest app-data disk pool=default source=app-data path=/backup/app-data readonly=true"}
|
||||
- !Command {command: "lxc exec backrest -- cloud-init status --wait --long"}
|
||||
- !Command {command: "lxc exec backrest -- systemctl is-active backrest"}
|
||||
- !Command {command: "# The web UI listens on port 9898 of the instance"}
|
||||
- !Command {command: "lxc list backrest --columns ns4"}
|
||||
- !Wait 6s
|
||||
- !Command {command: "demo_cleanup", hidden: true}
|
||||
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 100 KiB |
@@ -0,0 +1,752 @@
|
||||
{"version": 2, "width": 156, "height": 40, "timestamp": 1795292296, "duration": 41.630631, "env": {"SHELL": "/usr/bin/bash", "TERM": "xterm-256color", "PS1": "\\[\\e[1;34m\\]lxd\\[\\e[0m\\] > AUTOCAST_PROMPT", "PROMPT_COMMAND": "bind 'set enable-bracketed-paste off'"}}
|
||||
[0.0, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[0.0, "o", ""]
|
||||
[0.0, "m", "Restic"]
|
||||
[0.035, "o", "#"]
|
||||
[0.07, "o", " "]
|
||||
[0.105, "o", "r"]
|
||||
[0.14, "o", "e"]
|
||||
[0.175, "o", "s"]
|
||||
[0.21, "o", "t"]
|
||||
[0.245, "o", "i"]
|
||||
[0.28, "o", "c"]
|
||||
[0.315, "o", " "]
|
||||
[0.35, "o", "i"]
|
||||
[0.385, "o", "s"]
|
||||
[0.42, "o", " "]
|
||||
[0.455, "o", "a"]
|
||||
[0.49, "o", "v"]
|
||||
[0.525, "o", "a"]
|
||||
[0.56, "o", "i"]
|
||||
[0.595, "o", "l"]
|
||||
[0.63, "o", "a"]
|
||||
[0.665, "o", "b"]
|
||||
[0.7, "o", "l"]
|
||||
[0.735, "o", "e"]
|
||||
[0.77, "o", " "]
|
||||
[0.805, "o", "i"]
|
||||
[0.84, "o", "n"]
|
||||
[0.875, "o", " "]
|
||||
[0.91, "o", "t"]
|
||||
[0.945, "o", "h"]
|
||||
[0.98, "o", "e"]
|
||||
[1.015, "o", " "]
|
||||
[1.05, "o", "b"]
|
||||
[1.085, "o", "a"]
|
||||
[1.12, "o", "c"]
|
||||
[1.155, "o", "k"]
|
||||
[1.19, "o", "u"]
|
||||
[1.225, "o", "p"]
|
||||
[1.26, "o", " "]
|
||||
[1.295, "o", "i"]
|
||||
[1.33, "o", "n"]
|
||||
[1.365, "o", "s"]
|
||||
[1.4, "o", "t"]
|
||||
[1.435, "o", "a"]
|
||||
[1.47, "o", "n"]
|
||||
[1.505, "o", "c"]
|
||||
[1.54, "o", "e"]
|
||||
[1.575, "o", ","]
|
||||
[1.61, "o", " "]
|
||||
[1.645, "o", "n"]
|
||||
[1.68, "o", "e"]
|
||||
[1.715, "o", "x"]
|
||||
[1.75, "o", "t"]
|
||||
[1.785, "o", " "]
|
||||
[1.82, "o", "t"]
|
||||
[1.855, "o", "o"]
|
||||
[1.89, "o", " "]
|
||||
[1.925, "o", "B"]
|
||||
[1.96, "o", "a"]
|
||||
[1.995, "o", "c"]
|
||||
[2.03, "o", "k"]
|
||||
[2.065, "o", "r"]
|
||||
[2.1, "o", "e"]
|
||||
[2.135, "o", "s"]
|
||||
[2.17, "o", "t"]
|
||||
[2.205, "o", "\r\n"]
|
||||
[2.209259, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[2.20926, "o", ""]
|
||||
[2.24426, "o", "l"]
|
||||
[2.27926, "o", "x"]
|
||||
[2.31426, "o", "c"]
|
||||
[2.34926, "o", " "]
|
||||
[2.38426, "o", "s"]
|
||||
[2.41926, "o", "h"]
|
||||
[2.45426, "o", "e"]
|
||||
[2.48926, "o", "l"]
|
||||
[2.52426, "o", "l"]
|
||||
[2.55926, "o", " "]
|
||||
[2.59426, "o", "b"]
|
||||
[2.62926, "o", "a"]
|
||||
[2.66426, "o", "c"]
|
||||
[2.69926, "o", "k"]
|
||||
[2.73426, "o", "r"]
|
||||
[2.76926, "o", "e"]
|
||||
[2.80426, "o", "s"]
|
||||
[2.83926, "o", "t"]
|
||||
[2.87426, "o", "\r\n"]
|
||||
[3.192797, "o", "\u001b]3008;start=26fe51b93ef44c8daa8fdc2c61848f83;user=root;hostname=backrest;machineid=3eb50194b2f745eca62b4e3a672ec22c;bootid=a6976f29528446918536c5bfcfddc9bb;pid=3775;pidfdid=608822;comm=su;targetuser=root;sessionid=c1;type=session\u001b\\"]
|
||||
[3.230722, "o", "\u001b]3008;start=6237fdd2-49c6-4d91-bf2a-abfdd0da2bf0;type=shell;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[3.230835, "o", "\u001b[1;32mroot@backrest\u001b[0m:~# "]
|
||||
[3.230835, "o", ""]
|
||||
[3.265835, "o", "e"]
|
||||
[3.300835, "o", "x"]
|
||||
[3.335835, "o", "p"]
|
||||
[3.370835, "o", "o"]
|
||||
[3.405835, "o", "r"]
|
||||
[3.440835, "o", "t"]
|
||||
[3.475835, "o", " "]
|
||||
[3.510835, "o", "R"]
|
||||
[3.545835, "o", "E"]
|
||||
[3.580835, "o", "S"]
|
||||
[3.615835, "o", "T"]
|
||||
[3.650835, "o", "I"]
|
||||
[3.685835, "o", "C"]
|
||||
[3.720835, "o", "_"]
|
||||
[3.755835, "o", "R"]
|
||||
[3.790835, "o", "E"]
|
||||
[3.825835, "o", "P"]
|
||||
[3.860835, "o", "O"]
|
||||
[3.895835, "o", "S"]
|
||||
[3.930835, "o", "I"]
|
||||
[3.965835, "o", "T"]
|
||||
[4.000835, "o", "O"]
|
||||
[4.035835, "o", "R"]
|
||||
[4.070835, "o", "Y"]
|
||||
[4.105835, "o", "="]
|
||||
[4.140835, "o", "/"]
|
||||
[4.175835, "o", "b"]
|
||||
[4.210835, "o", "a"]
|
||||
[4.245835, "o", "c"]
|
||||
[4.280835, "o", "k"]
|
||||
[4.315835, "o", "u"]
|
||||
[4.350835, "o", "p"]
|
||||
[4.385835, "o", "s"]
|
||||
[4.420835, "o", "/"]
|
||||
[4.455835, "o", "r"]
|
||||
[4.490835, "o", "e"]
|
||||
[4.525835, "o", "s"]
|
||||
[4.560835, "o", "t"]
|
||||
[4.595835, "o", "i"]
|
||||
[4.630835, "o", "c"]
|
||||
[4.665835, "o", " "]
|
||||
[4.700835, "o", "R"]
|
||||
[4.735835, "o", "E"]
|
||||
[4.770835, "o", "S"]
|
||||
[4.805835, "o", "T"]
|
||||
[4.840835, "o", "I"]
|
||||
[4.875835, "o", "C"]
|
||||
[4.910835, "o", "_"]
|
||||
[4.945835, "o", "P"]
|
||||
[4.980835, "o", "A"]
|
||||
[5.015835, "o", "S"]
|
||||
[5.050835, "o", "S"]
|
||||
[5.085835, "o", "W"]
|
||||
[5.120835, "o", "O"]
|
||||
[5.155835, "o", "R"]
|
||||
[5.190835, "o", "D"]
|
||||
[5.225835, "o", "="]
|
||||
[5.260835, "o", "d"]
|
||||
[5.295835, "o", "e"]
|
||||
[5.330835, "o", "m"]
|
||||
[5.365835, "o", "o"]
|
||||
[5.400835, "o", "-"]
|
||||
[5.435835, "o", "r"]
|
||||
[5.470835, "o", "e"]
|
||||
[5.505835, "o", "p"]
|
||||
[5.540835, "o", "o"]
|
||||
[5.575835, "o", "-"]
|
||||
[5.610835, "o", "p"]
|
||||
[5.645835, "o", "a"]
|
||||
[5.680835, "o", "s"]
|
||||
[5.715835, "o", "s"]
|
||||
[5.750835, "o", "w"]
|
||||
[5.785835, "o", "o"]
|
||||
[5.820835, "o", "r"]
|
||||
[5.855835, "o", "d"]
|
||||
[5.890835, "o", "\r\n"]
|
||||
[5.89258, "o", "\u001b]3008;start=03654584-1fa2-4c51-bb85-06611a0038d1;type=command;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[5.892742, "o", "\u001b]3008;end=03654584-1fa2-4c51-bb85-06611a0038d1;exit=success\u001b\\"]
|
||||
[5.893457, "o", "\u001b]3008;start=6237fdd2-49c6-4d91-bf2a-abfdd0da2bf0;type=shell;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[5.893591, "o", "\u001b[1;32mroot@backrest\u001b[0m:~# "]
|
||||
[5.893592, "o", ""]
|
||||
[5.928592, "o", "r"]
|
||||
[5.963592, "o", "e"]
|
||||
[5.998592, "o", "s"]
|
||||
[6.033592, "o", "t"]
|
||||
[6.068592, "o", "i"]
|
||||
[6.103592, "o", "c"]
|
||||
[6.138592, "o", " "]
|
||||
[6.173592, "o", "s"]
|
||||
[6.208592, "o", "n"]
|
||||
[6.243592, "o", "a"]
|
||||
[6.278592, "o", "p"]
|
||||
[6.313592, "o", "s"]
|
||||
[6.348592, "o", "h"]
|
||||
[6.383592, "o", "o"]
|
||||
[6.418592, "o", "t"]
|
||||
[6.453592, "o", "s"]
|
||||
[6.488592, "o", "\r\n"]
|
||||
[6.490192, "o", "\u001b]3008;start=6915a2d1-c57a-4ba0-b89e-2749f0b6b790;type=command;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[7.015473, "o", "\r\u001b[2Krepository 9f8fbdd5 opened (version 2, compression level auto)\r\n"]
|
||||
[7.227199, "o", "\r\u001b[2KID Time Host Tags Paths Size\r\n\r\u001b[2K-----------------------------------------------------------------------------------------------------------\r\n\r\u001b[2Ka098093f 2026-11-21 21:18:03 backrest plan:app-data,created-by:backrest /backup/app-data 312.356 KiB\r\n\r\u001b[2K-----------------------------------------------------------------------------------------------------------\r\n"]
|
||||
[7.227204, "o", "\r\u001b[2KTimestamps shown in local time\r\n1 snapshots\r\n"]
|
||||
[7.230976, "o", "\u001b]3008;end=6915a2d1-c57a-4ba0-b89e-2749f0b6b790;exit=success\u001b\\"]
|
||||
[7.231874, "o", "\u001b]3008;start=6237fdd2-49c6-4d91-bf2a-abfdd0da2bf0;type=shell;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[7.232106, "o", "\u001b[1;32mroot@backrest\u001b[0m:~# "]
|
||||
[7.232106, "o", ""]
|
||||
[9.267106, "o", "r"]
|
||||
[9.302106, "o", "e"]
|
||||
[9.337106, "o", "s"]
|
||||
[9.372106, "o", "t"]
|
||||
[9.407106, "o", "i"]
|
||||
[9.442106, "o", "c"]
|
||||
[9.477106, "o", " "]
|
||||
[9.512106, "o", "l"]
|
||||
[9.547106, "o", "s"]
|
||||
[9.582106, "o", " "]
|
||||
[9.617106, "o", "l"]
|
||||
[9.652106, "o", "a"]
|
||||
[9.687106, "o", "t"]
|
||||
[9.722106, "o", "e"]
|
||||
[9.757106, "o", "s"]
|
||||
[9.792106, "o", "t"]
|
||||
[9.827106, "o", " "]
|
||||
[9.862106, "o", "/"]
|
||||
[9.897106, "o", "b"]
|
||||
[9.932106, "o", "a"]
|
||||
[9.967106, "o", "c"]
|
||||
[10.002106, "o", "k"]
|
||||
[10.037106, "o", "u"]
|
||||
[10.072106, "o", "p"]
|
||||
[10.107106, "o", "/"]
|
||||
[10.142106, "o", "a"]
|
||||
[10.177106, "o", "p"]
|
||||
[10.212106, "o", "p"]
|
||||
[10.247106, "o", "-"]
|
||||
[10.282106, "o", "d"]
|
||||
[10.317106, "o", "a"]
|
||||
[10.352106, "o", "t"]
|
||||
[10.387106, "o", "a"]
|
||||
[10.422106, "o", " "]
|
||||
[10.457106, "o", "-"]
|
||||
[10.492106, "o", "-"]
|
||||
[10.527106, "o", "r"]
|
||||
[10.562106, "o", "e"]
|
||||
[10.597106, "o", "c"]
|
||||
[10.632106, "o", "u"]
|
||||
[10.667106, "o", "r"]
|
||||
[10.702106, "o", "s"]
|
||||
[10.737106, "o", "i"]
|
||||
[10.772106, "o", "v"]
|
||||
[10.807106, "o", "e"]
|
||||
[10.842106, "o", " "]
|
||||
[10.877106, "o", "|"]
|
||||
[10.912106, "o", " "]
|
||||
[10.947106, "o", "h"]
|
||||
[10.982106, "o", "e"]
|
||||
[11.017106, "o", "a"]
|
||||
[11.052106, "o", "d"]
|
||||
[11.087106, "o", " "]
|
||||
[11.122106, "o", "-"]
|
||||
[11.157106, "o", "1"]
|
||||
[11.192106, "o", "2"]
|
||||
[11.227106, "o", "\r\n"]
|
||||
[11.229846, "o", "\u001b]3008;start=d720e610-1d36-49fd-9e20-ce5d3db74074;type=command;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[12.010121, "o", "snapshot a098093f of [/backup/app-data] at 2026-11-21 21:18:03.143304819 +0100 CET by root@backrest filtered by [/backup/app-data]:\r\n/backup/app-data\r\n/backup/app-data/documents\r\n/backup/app-data/documents/bash\r\n/backup/app-data/documents/bash/COMPAT.gz\r\n/backup/app-data/documents/bash/INTRO.gz\r\n/backup/app-data/documents/bash/NEWS.gz\r\n/backup/app-data/documents/bash/POSIX.gz\r\n/backup/app-data/documents/bash/RBASH\r\n/backup/app-data/documents/bash/README.Debian.gz\r\n/backup/app-data/documents/bash/README.abs-guide\r\n/backup/app-data/documents/bash/README.commands.gz\r\n"]
|
||||
[12.017389, "o", "\u001b]3008;end=d720e610-1d36-49fd-9e20-ce5d3db74074;exit=success\u001b\\"]
|
||||
[12.01834, "o", "\u001b]3008;start=6237fdd2-49c6-4d91-bf2a-abfdd0da2bf0;type=shell;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[12.018501, "o", "\u001b[1;32mroot@backrest\u001b[0m:~# "]
|
||||
[12.018503, "o", ""]
|
||||
[14.053503, "o", "r"]
|
||||
[14.088503, "o", "e"]
|
||||
[14.123503, "o", "s"]
|
||||
[14.158503, "o", "t"]
|
||||
[14.193503, "o", "i"]
|
||||
[14.228503, "o", "c"]
|
||||
[14.263503, "o", " "]
|
||||
[14.298503, "o", "s"]
|
||||
[14.333503, "o", "t"]
|
||||
[14.368503, "o", "a"]
|
||||
[14.403503, "o", "t"]
|
||||
[14.438503, "o", "s"]
|
||||
[14.473503, "o", " "]
|
||||
[14.508503, "o", "l"]
|
||||
[14.543503, "o", "a"]
|
||||
[14.578503, "o", "t"]
|
||||
[14.613503, "o", "e"]
|
||||
[14.648503, "o", "s"]
|
||||
[14.683503, "o", "t"]
|
||||
[14.718503, "o", "\r\n"]
|
||||
[14.720267, "o", "\u001b]3008;start=0734097c-fbf3-43bd-914a-fd8f23ef0477;type=command;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[15.278388, "o", "\r\u001b[2Krepository 9f8fbdd5 opened (version 2, compression level auto)\r\n"]
|
||||
[15.501736, "o", "\r\u001b[2K[0:00] 100.00% 1 / 1 index files loaded\r\n"]
|
||||
[15.502447, "o", "\r\u001b[2Kscanning...\r\n"]
|
||||
[15.503931, "o", "\r\u001b[2K[0:00] 100.00% 1 / 1 snapshots, 36 files, 312.356 KiB\r\n\r\u001b[2KStats in restore-size mode:\r\n\r\u001b[2K Snapshots processed: 1\r\n\r\u001b[2K Total File Count: 36\r\n\r\u001b[2K Total Size: 312.356 KiB\r\n"]
|
||||
[15.508906, "o", "\u001b]3008;end=0734097c-fbf3-43bd-914a-fd8f23ef0477;exit=success\u001b\\"]
|
||||
[15.509776, "o", "\u001b]3008;start=6237fdd2-49c6-4d91-bf2a-abfdd0da2bf0;type=shell;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\"]
|
||||
[15.509911, "o", "\u001b[1;32mroot@backrest\u001b[0m:~# "]
|
||||
[15.509912, "o", ""]
|
||||
[15.544912, "o", "e"]
|
||||
[15.579912, "o", "x"]
|
||||
[15.614912, "o", "i"]
|
||||
[15.649912, "o", "t"]
|
||||
[15.684912, "o", "\r\n"]
|
||||
[15.686426, "o", "\u001b]3008;start=4b7763f8-887b-406e-8a7b-0d12db9e3554;type=command;machineid=3eb50194b2f745eca62b4e3a672ec22c;user=root;hostname=backrest;bootid=a6976f29-5284-4691-8536-c5bfcfddc9bb;pid=3799;cwd=/root\u001b\\logout\r\n"]
|
||||
[15.686996, "o", "\u001b]3008;end=26fe51b93ef44c8daa8fdc2c61848f83\u001b\\"]
|
||||
[15.71306, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[15.71306, "o", ""]
|
||||
[18.74806, "o", "\r\u001b[H\u001b[2J\u001b[3J\u001b[1;34mlxd\u001b[0m > "]
|
||||
[18.78306, "o", ""]
|
||||
[18.78306, "m", "Restore"]
|
||||
[18.81806, "o", "#"]
|
||||
[18.85306, "o", " "]
|
||||
[18.88806, "o", "O"]
|
||||
[18.92306, "o", "o"]
|
||||
[18.95806, "o", "p"]
|
||||
[18.99306, "o", "s"]
|
||||
[19.02806, "o", ":"]
|
||||
[19.06306, "o", " "]
|
||||
[19.09806, "o", "a"]
|
||||
[19.13306, "o", " "]
|
||||
[19.16806, "o", "f"]
|
||||
[19.20306, "o", "i"]
|
||||
[19.23806, "o", "l"]
|
||||
[19.27306, "o", "e"]
|
||||
[19.30806, "o", " "]
|
||||
[19.34306, "o", "o"]
|
||||
[19.37806, "o", "f"]
|
||||
[19.41306, "o", " "]
|
||||
[19.44806, "o", "t"]
|
||||
[19.48306, "o", "h"]
|
||||
[19.51806, "o", "e"]
|
||||
[19.55306, "o", " "]
|
||||
[19.58806, "o", "a"]
|
||||
[19.62306, "o", "p"]
|
||||
[19.65806, "o", "p"]
|
||||
[19.69306, "o", " "]
|
||||
[19.72806, "o", "i"]
|
||||
[19.76306, "o", "n"]
|
||||
[19.79806, "o", "s"]
|
||||
[19.83306, "o", "t"]
|
||||
[19.86806, "o", "a"]
|
||||
[19.90306, "o", "n"]
|
||||
[19.93806, "o", "c"]
|
||||
[19.97306, "o", "e"]
|
||||
[20.00806, "o", " "]
|
||||
[20.04306, "o", "i"]
|
||||
[20.07806, "o", "s"]
|
||||
[20.11306, "o", " "]
|
||||
[20.14806, "o", "l"]
|
||||
[20.18306, "o", "o"]
|
||||
[20.21806, "o", "s"]
|
||||
[20.25306, "o", "t"]
|
||||
[20.28806, "o", "\r\n"]
|
||||
[20.29352, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[20.293521, "o", ""]
|
||||
[20.328521, "o", "l"]
|
||||
[20.363521, "o", "x"]
|
||||
[20.398521, "o", "c"]
|
||||
[20.433521, "o", " "]
|
||||
[20.468521, "o", "e"]
|
||||
[20.503521, "o", "x"]
|
||||
[20.538521, "o", "e"]
|
||||
[20.573521, "o", "c"]
|
||||
[20.608521, "o", " "]
|
||||
[20.643521, "o", "a"]
|
||||
[20.678521, "o", "p"]
|
||||
[20.713521, "o", "p"]
|
||||
[20.748521, "o", " "]
|
||||
[20.783521, "o", "-"]
|
||||
[20.818521, "o", "-"]
|
||||
[20.853521, "o", " "]
|
||||
[20.888521, "o", "r"]
|
||||
[20.923521, "o", "m"]
|
||||
[20.958521, "o", " "]
|
||||
[20.993521, "o", "/"]
|
||||
[21.028521, "o", "s"]
|
||||
[21.063521, "o", "r"]
|
||||
[21.098521, "o", "v"]
|
||||
[21.133521, "o", "/"]
|
||||
[21.168521, "o", "a"]
|
||||
[21.203521, "o", "p"]
|
||||
[21.238521, "o", "p"]
|
||||
[21.273521, "o", "/"]
|
||||
[21.308521, "o", "n"]
|
||||
[21.343521, "o", "o"]
|
||||
[21.378521, "o", "t"]
|
||||
[21.413521, "o", "e"]
|
||||
[21.448521, "o", "s"]
|
||||
[21.483521, "o", "."]
|
||||
[21.518521, "o", "t"]
|
||||
[21.553521, "o", "x"]
|
||||
[21.588521, "o", "t"]
|
||||
[21.623521, "o", "\r\n"]
|
||||
[21.817423, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[21.817423, "o", ""]
|
||||
[21.852423, "o", "l"]
|
||||
[21.887423, "o", "x"]
|
||||
[21.922423, "o", "c"]
|
||||
[21.957423, "o", " "]
|
||||
[21.992423, "o", "e"]
|
||||
[22.027423, "o", "x"]
|
||||
[22.062423, "o", "e"]
|
||||
[22.097423, "o", "c"]
|
||||
[22.132423, "o", " "]
|
||||
[22.167423, "o", "a"]
|
||||
[22.202423, "o", "p"]
|
||||
[22.237423, "o", "p"]
|
||||
[22.272423, "o", " "]
|
||||
[22.307423, "o", "-"]
|
||||
[22.342423, "o", "-"]
|
||||
[22.377423, "o", " "]
|
||||
[22.412423, "o", "c"]
|
||||
[22.447423, "o", "a"]
|
||||
[22.482423, "o", "t"]
|
||||
[22.517423, "o", " "]
|
||||
[22.552423, "o", "/"]
|
||||
[22.587423, "o", "s"]
|
||||
[22.622423, "o", "r"]
|
||||
[22.657423, "o", "v"]
|
||||
[22.692423, "o", "/"]
|
||||
[22.727423, "o", "a"]
|
||||
[22.762423, "o", "p"]
|
||||
[22.797423, "o", "p"]
|
||||
[22.832423, "o", "/"]
|
||||
[22.867423, "o", "n"]
|
||||
[22.902423, "o", "o"]
|
||||
[22.937423, "o", "t"]
|
||||
[22.972423, "o", "e"]
|
||||
[23.007423, "o", "s"]
|
||||
[23.042423, "o", "."]
|
||||
[23.077423, "o", "t"]
|
||||
[23.112423, "o", "x"]
|
||||
[23.147423, "o", "t"]
|
||||
[23.182423, "o", "\r\n"]
|
||||
[23.375436, "o", "cat: /srv/app/notes.txt: No such file or directory\r\n"]
|
||||
[23.388642, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[23.388643, "o", ""]
|
||||
[23.423643, "o", "#"]
|
||||
[23.458643, "o", " "]
|
||||
[23.493643, "o", "r"]
|
||||
[23.528643, "o", "e"]
|
||||
[23.563643, "o", "s"]
|
||||
[23.598643, "o", "t"]
|
||||
[23.633643, "o", "i"]
|
||||
[23.668643, "o", "c"]
|
||||
[23.703643, "o", " "]
|
||||
[23.738643, "o", "d"]
|
||||
[23.773643, "o", "u"]
|
||||
[23.808643, "o", "m"]
|
||||
[23.843643, "o", "p"]
|
||||
[23.878643, "o", " "]
|
||||
[23.913643, "o", "w"]
|
||||
[23.948643, "o", "r"]
|
||||
[23.983643, "o", "i"]
|
||||
[24.018643, "o", "t"]
|
||||
[24.053643, "o", "e"]
|
||||
[24.088643, "o", "s"]
|
||||
[24.123643, "o", " "]
|
||||
[24.158643, "o", "i"]
|
||||
[24.193643, "o", "t"]
|
||||
[24.228643, "o", " "]
|
||||
[24.263643, "o", "f"]
|
||||
[24.298643, "o", "r"]
|
||||
[24.333643, "o", "o"]
|
||||
[24.368643, "o", "m"]
|
||||
[24.403643, "o", " "]
|
||||
[24.438643, "o", "t"]
|
||||
[24.473643, "o", "h"]
|
||||
[24.508643, "o", "e"]
|
||||
[24.543643, "o", " "]
|
||||
[24.578643, "o", "l"]
|
||||
[24.613643, "o", "a"]
|
||||
[24.648643, "o", "t"]
|
||||
[24.683643, "o", "e"]
|
||||
[24.718643, "o", "s"]
|
||||
[24.753643, "o", "t"]
|
||||
[24.788643, "o", " "]
|
||||
[24.823643, "o", "s"]
|
||||
[24.858643, "o", "n"]
|
||||
[24.893643, "o", "a"]
|
||||
[24.928643, "o", "p"]
|
||||
[24.963643, "o", "s"]
|
||||
[24.998643, "o", "h"]
|
||||
[25.033643, "o", "o"]
|
||||
[25.068643, "o", "t"]
|
||||
[25.103643, "o", ","]
|
||||
[25.138643, "o", " "]
|
||||
[25.173643, "o", "l"]
|
||||
[25.208643, "o", "x"]
|
||||
[25.243643, "o", "c"]
|
||||
[25.278643, "o", " "]
|
||||
[25.313643, "o", "f"]
|
||||
[25.348643, "o", "i"]
|
||||
[25.383643, "o", "l"]
|
||||
[25.418643, "o", "e"]
|
||||
[25.453643, "o", " "]
|
||||
[25.488643, "o", "p"]
|
||||
[25.523643, "o", "u"]
|
||||
[25.558643, "o", "s"]
|
||||
[25.593643, "o", "h"]
|
||||
[25.628643, "o", " "]
|
||||
[25.663643, "o", "p"]
|
||||
[25.698643, "o", "u"]
|
||||
[25.733643, "o", "t"]
|
||||
[25.768643, "o", "s"]
|
||||
[25.803643, "o", " "]
|
||||
[25.838643, "o", "i"]
|
||||
[25.873643, "o", "t"]
|
||||
[25.908643, "o", " "]
|
||||
[25.943643, "o", "b"]
|
||||
[25.978643, "o", "a"]
|
||||
[26.013643, "o", "c"]
|
||||
[26.048643, "o", "k"]
|
||||
[26.083643, "o", "\r\n"]
|
||||
[26.093186, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[26.093187, "o", ""]
|
||||
[26.128187, "o", "l"]
|
||||
[26.163187, "o", "x"]
|
||||
[26.198187, "o", "c"]
|
||||
[26.233187, "o", " "]
|
||||
[26.268187, "o", "e"]
|
||||
[26.303187, "o", "x"]
|
||||
[26.338187, "o", "e"]
|
||||
[26.373187, "o", "c"]
|
||||
[26.408187, "o", " "]
|
||||
[26.443187, "o", "b"]
|
||||
[26.478187, "o", "a"]
|
||||
[26.513187, "o", "c"]
|
||||
[26.548187, "o", "k"]
|
||||
[26.583187, "o", "r"]
|
||||
[26.618187, "o", "e"]
|
||||
[26.653187, "o", "s"]
|
||||
[26.688187, "o", "t"]
|
||||
[26.723187, "o", " "]
|
||||
[26.758187, "o", "-"]
|
||||
[26.793187, "o", "-"]
|
||||
[26.828187, "o", "e"]
|
||||
[26.863187, "o", "n"]
|
||||
[26.898187, "o", "v"]
|
||||
[26.933187, "o", " "]
|
||||
[26.968187, "o", "R"]
|
||||
[27.003187, "o", "E"]
|
||||
[27.038187, "o", "S"]
|
||||
[27.073187, "o", "T"]
|
||||
[27.108187, "o", "I"]
|
||||
[27.143187, "o", "C"]
|
||||
[27.178187, "o", "_"]
|
||||
[27.213187, "o", "P"]
|
||||
[27.248187, "o", "A"]
|
||||
[27.283187, "o", "S"]
|
||||
[27.318187, "o", "S"]
|
||||
[27.353187, "o", "W"]
|
||||
[27.388187, "o", "O"]
|
||||
[27.423187, "o", "R"]
|
||||
[27.458187, "o", "D"]
|
||||
[27.493187, "o", "="]
|
||||
[27.528187, "o", "d"]
|
||||
[27.563187, "o", "e"]
|
||||
[27.598187, "o", "m"]
|
||||
[27.633187, "o", "o"]
|
||||
[27.668187, "o", "-"]
|
||||
[27.703187, "o", "r"]
|
||||
[27.738187, "o", "e"]
|
||||
[27.773187, "o", "p"]
|
||||
[27.808187, "o", "o"]
|
||||
[27.843187, "o", "-"]
|
||||
[27.878187, "o", "p"]
|
||||
[27.913187, "o", "a"]
|
||||
[27.948187, "o", "s"]
|
||||
[27.983187, "o", "s"]
|
||||
[28.018187, "o", "w"]
|
||||
[28.053187, "o", "o"]
|
||||
[28.088187, "o", "r"]
|
||||
[28.123187, "o", "d"]
|
||||
[28.158187, "o", " "]
|
||||
[28.193187, "o", "-"]
|
||||
[28.228187, "o", "-"]
|
||||
[28.263187, "o", " "]
|
||||
[28.298187, "o", "r"]
|
||||
[28.333187, "o", "e"]
|
||||
[28.368187, "o", "s"]
|
||||
[28.403187, "o", "t"]
|
||||
[28.438187, "o", "i"]
|
||||
[28.473187, "o", "c"]
|
||||
[28.508187, "o", " "]
|
||||
[28.543187, "o", "-"]
|
||||
[28.578187, "o", "-"]
|
||||
[28.613187, "o", "r"]
|
||||
[28.648187, "o", "e"]
|
||||
[28.683187, "o", "p"]
|
||||
[28.718187, "o", "o"]
|
||||
[28.753187, "o", " "]
|
||||
[28.788187, "o", "/"]
|
||||
[28.823187, "o", "b"]
|
||||
[28.858187, "o", "a"]
|
||||
[28.893187, "o", "c"]
|
||||
[28.928187, "o", "k"]
|
||||
[28.963187, "o", "u"]
|
||||
[28.998187, "o", "p"]
|
||||
[29.033187, "o", "s"]
|
||||
[29.068187, "o", "/"]
|
||||
[29.103187, "o", "r"]
|
||||
[29.138187, "o", "e"]
|
||||
[29.173187, "o", "s"]
|
||||
[29.208187, "o", "t"]
|
||||
[29.243187, "o", "i"]
|
||||
[29.278187, "o", "c"]
|
||||
[29.313187, "o", " "]
|
||||
[29.348187, "o", "d"]
|
||||
[29.383187, "o", "u"]
|
||||
[29.418187, "o", "m"]
|
||||
[29.453187, "o", "p"]
|
||||
[29.488187, "o", " "]
|
||||
[29.523187, "o", "l"]
|
||||
[29.558187, "o", "a"]
|
||||
[29.593187, "o", "t"]
|
||||
[29.628187, "o", "e"]
|
||||
[29.663187, "o", "s"]
|
||||
[29.698187, "o", "t"]
|
||||
[29.733187, "o", " "]
|
||||
[29.768187, "o", "/"]
|
||||
[29.803187, "o", "b"]
|
||||
[29.838187, "o", "a"]
|
||||
[29.873187, "o", "c"]
|
||||
[29.908187, "o", "k"]
|
||||
[29.943187, "o", "u"]
|
||||
[29.978187, "o", "p"]
|
||||
[30.013187, "o", "/"]
|
||||
[30.048187, "o", "a"]
|
||||
[30.083187, "o", "p"]
|
||||
[30.118187, "o", "p"]
|
||||
[30.153187, "o", "-"]
|
||||
[30.188187, "o", "d"]
|
||||
[30.223187, "o", "a"]
|
||||
[30.258187, "o", "t"]
|
||||
[30.293187, "o", "a"]
|
||||
[30.328187, "o", "/"]
|
||||
[30.363187, "o", "n"]
|
||||
[30.398187, "o", "o"]
|
||||
[30.433187, "o", "t"]
|
||||
[30.468187, "o", "e"]
|
||||
[30.503187, "o", "s"]
|
||||
[30.538187, "o", "."]
|
||||
[30.573187, "o", "t"]
|
||||
[30.608187, "o", "x"]
|
||||
[30.643187, "o", "t"]
|
||||
[30.678187, "o", " "]
|
||||
[30.713187, "o", "|"]
|
||||
[30.748187, "o", " "]
|
||||
[30.783187, "o", "l"]
|
||||
[30.818187, "o", "x"]
|
||||
[30.853187, "o", "c"]
|
||||
[30.888187, "o", " "]
|
||||
[30.923187, "o", "f"]
|
||||
[30.958187, "o", "i"]
|
||||
[30.993187, "o", "l"]
|
||||
[31.028187, "o", "e"]
|
||||
[31.063187, "o", " "]
|
||||
[31.098187, "o", "p"]
|
||||
[31.133187, "o", "u"]
|
||||
[31.168187, "o", "s"]
|
||||
[31.203187, "o", "h"]
|
||||
[31.238187, "o", " "]
|
||||
[31.273187, "o", "-"]
|
||||
[31.308187, "o", "-"]
|
||||
[31.343187, "o", "u"]
|
||||
[31.378187, "o", "i"]
|
||||
[31.413187, "o", "d"]
|
||||
[31.448187, "o", " "]
|
||||
[31.483187, "o", "0"]
|
||||
[31.518187, "o", " "]
|
||||
[31.553187, "o", "-"]
|
||||
[31.588187, "o", "-"]
|
||||
[31.623187, "o", "g"]
|
||||
[31.658187, "o", "i"]
|
||||
[31.693187, "o", "d"]
|
||||
[31.728187, "o", " "]
|
||||
[31.763187, "o", "0"]
|
||||
[31.798187, "o", " "]
|
||||
[31.833187, "o", "-"]
|
||||
[31.868187, "o", "-"]
|
||||
[31.903187, "o", "m"]
|
||||
[31.938187, "o", "o"]
|
||||
[31.973187, "o", "d"]
|
||||
[32.008187, "o", "e"]
|
||||
[32.043187, "o", " "]
|
||||
[32.078187, "o", "0"]
|
||||
[32.113187, "o", "6"]
|
||||
[32.148187, "o", "4"]
|
||||
[32.183187, "o", "4"]
|
||||
[32.218187, "o", " "]
|
||||
[32.253187, "o", "-"]
|
||||
[32.288187, "o", " "]
|
||||
[32.323187, "o", "a"]
|
||||
[32.358187, "o", "p"]
|
||||
[32.393187, "o", "p"]
|
||||
[32.428187, "o", "/"]
|
||||
[32.463187, "o", "s"]
|
||||
[32.498187, "o", "r"]
|
||||
[32.533187, "o", "v"]
|
||||
[32.568187, "o", "/"]
|
||||
[32.603187, "o", "a"]
|
||||
[32.638187, "o", "p"]
|
||||
[32.673187, "o", "p"]
|
||||
[32.708187, "o", "/"]
|
||||
[32.743187, "o", "n"]
|
||||
[32.778187, "o", "o"]
|
||||
[32.813187, "o", "t"]
|
||||
[32.848187, "o", "e"]
|
||||
[32.883187, "o", "s"]
|
||||
[32.918187, "o", "."]
|
||||
[32.953187, "o", "t"]
|
||||
[32.988187, "o", "x"]
|
||||
[33.023187, "o", "t"]
|
||||
[33.058187, "o", "\r\n"]
|
||||
[34.064948, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[34.064949, "o", ""]
|
||||
[34.099949, "o", "l"]
|
||||
[34.134949, "o", "x"]
|
||||
[34.169949, "o", "c"]
|
||||
[34.204949, "o", " "]
|
||||
[34.239949, "o", "e"]
|
||||
[34.274949, "o", "x"]
|
||||
[34.309949, "o", "e"]
|
||||
[34.344949, "o", "c"]
|
||||
[34.379949, "o", " "]
|
||||
[34.414949, "o", "a"]
|
||||
[34.449949, "o", "p"]
|
||||
[34.484949, "o", "p"]
|
||||
[34.519949, "o", " "]
|
||||
[34.554949, "o", "-"]
|
||||
[34.589949, "o", "-"]
|
||||
[34.624949, "o", " "]
|
||||
[34.659949, "o", "c"]
|
||||
[34.694949, "o", "a"]
|
||||
[34.729949, "o", "t"]
|
||||
[34.764949, "o", " "]
|
||||
[34.799949, "o", "/"]
|
||||
[34.834949, "o", "s"]
|
||||
[34.869949, "o", "r"]
|
||||
[34.904949, "o", "v"]
|
||||
[34.939949, "o", "/"]
|
||||
[34.974949, "o", "a"]
|
||||
[35.009949, "o", "p"]
|
||||
[35.044949, "o", "p"]
|
||||
[35.079949, "o", "/"]
|
||||
[35.114949, "o", "n"]
|
||||
[35.149949, "o", "o"]
|
||||
[35.184949, "o", "t"]
|
||||
[35.219949, "o", "e"]
|
||||
[35.254949, "o", "s"]
|
||||
[35.289949, "o", "."]
|
||||
[35.324949, "o", "t"]
|
||||
[35.359949, "o", "x"]
|
||||
[35.394949, "o", "t"]
|
||||
[35.429949, "o", "\r\n"]
|
||||
[35.578345, "o", "Hello from app\r\n"]
|
||||
[35.59563, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[35.595631, "o", ""]
|
||||
[41.630631, "o", "\r\n"]
|
||||
|
After Width: | Height: | Size: 421 KiB |
@@ -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}
|
||||
@@ -0,0 +1,84 @@
|
||||
// Screenshots of the Backrest web UI for the tutorial (run by screenshots.sh in
|
||||
// a browser instance): first-run settings, repository, plan, backup, snapshot.
|
||||
// node screenshots.mjs <backrest URL> <output directory>
|
||||
import { chromium } from "playwright-core";
|
||||
|
||||
const [url, out] = process.argv.slice(2);
|
||||
const browser = await chromium.launch({ executablePath: "/usr/bin/chromium" });
|
||||
const page = await browser.newPage({ viewport: { width: 1280, height: 960 }, timezoneId: "Europe/Paris" });
|
||||
const shot = (name) => page.screenshot({ path: `${out}/${name}.png` });
|
||||
const pause = (ms = 800) => page.waitForTimeout(ms);
|
||||
const button = (name) => page.getByRole("button", { name, exact: true });
|
||||
const toTop = (locator) => locator.evaluate((e) => e.scrollIntoView({ block: "start" }));
|
||||
|
||||
// First run: instance ID and an administrator account
|
||||
await page.goto(url);
|
||||
await page.getByPlaceholder("Unique instance ID").fill("backrest");
|
||||
await page.getByText("Disable Authentication").click();
|
||||
await button("Add user").click();
|
||||
await page.getByPlaceholder("Username").fill("admin");
|
||||
await page.getByPlaceholder("Password").fill("demo-password");
|
||||
await toTop(page.getByText("Instance ID").first());
|
||||
await pause();
|
||||
await shot("settings");
|
||||
await button("Save changes").click();
|
||||
await pause(2500);
|
||||
|
||||
// Log in
|
||||
await page.goto(url);
|
||||
await page.getByPlaceholder("Username").fill("admin");
|
||||
await page.getByPlaceholder("Password").fill("demo-password");
|
||||
await button("Log in").click();
|
||||
await pause(1500);
|
||||
|
||||
// Repository: restic repository on the backups volume
|
||||
await button("Add Repo").click();
|
||||
await pause();
|
||||
await page.getByPlaceholder("repo1").fill("local");
|
||||
await page.getByRole("combobox").first().fill("/backups/restic");
|
||||
await page.locator("input[type=password]").first().fill("demo-repo-password");
|
||||
await page.getByText("Repository URI").first().click();
|
||||
await pause();
|
||||
await shot("repo");
|
||||
await button("Submit").click();
|
||||
await pause(4000);
|
||||
|
||||
// Plan: the read-only data volume, every night at 3am
|
||||
await button("Add Plan").click();
|
||||
await pause();
|
||||
await page.getByPlaceholder("plan1").fill("app-data");
|
||||
await page.getByRole("combobox").filter({ hasText: "Select repository" }).click();
|
||||
await page.getByRole("option", { name: "local" }).click();
|
||||
await button("Add").first().click();
|
||||
await page.getByPlaceholder("Paths").fill("/backup/app-data");
|
||||
await page.getByText("Plan Name").first().click();
|
||||
await page.locator('input[value="0 * * * *"]').fill("0 3 * * *");
|
||||
await page.getByText("Plan Name").first().click();
|
||||
await pause();
|
||||
await shot("plan");
|
||||
await page.getByText("Cron Expression").first().scrollIntoViewIfNeeded();
|
||||
await pause();
|
||||
await shot("plan-schedule");
|
||||
await button("Submit").click();
|
||||
await pause(3000);
|
||||
|
||||
// First backup, then its details and the snapshot browser
|
||||
await page.getByText("app-data").first().click();
|
||||
await pause();
|
||||
await button("Backup Now").click();
|
||||
await page.getByText(/ID: [0-9a-f]+/).first().waitFor({ timeout: 60000 });
|
||||
await pause(2000);
|
||||
await page.getByText(/ID: [0-9a-f]+/).first().click();
|
||||
await pause(1500);
|
||||
await shot("backup");
|
||||
await button("Snapshot Browser").click();
|
||||
await pause(1500);
|
||||
for (const name of ["backup", "app-data", "documents"]) {
|
||||
await page.locator(".ant-tree-title, [role=treeitem]").filter({ hasText: new RegExp(`^${name}$`) }).first().click();
|
||||
await pause();
|
||||
}
|
||||
await toTop(page.getByText("Snapshot Browser").last());
|
||||
await pause();
|
||||
await shot("snapshot");
|
||||
|
||||
await browser.close();
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/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
|
||||
|
After Width: | Height: | Size: 95 KiB |
@@ -0,0 +1,87 @@
|
||||
# shellcheck shell=bash
|
||||
# Hidden preamble of the Backrest demos (autocast), sourced from the repository root.
|
||||
# source demo/backrest/setup.sh install # only the data to protect: instance "app" and its volume app-data
|
||||
# source demo/backrest/setup.sh ui # backrest instance launched, not configured (screenshots.sh)
|
||||
# source demo/backrest/setup.sh restore # everything ready: backrest configured, one snapshot taken
|
||||
# demo_cleanup (epilogue) removes what the demo created.
|
||||
eval "$(mise activate bash)"
|
||||
source demo/lib.sh
|
||||
DEMO_PROFILE=app-backrest
|
||||
DEMO_REPO_PASSWORD=demo-repo-password
|
||||
DEMO_CREATED=
|
||||
|
||||
demo_exists() {
|
||||
lxc info backrest >/dev/null 2>&1 || lxc info app >/dev/null 2>&1 \
|
||||
|| lxc profile show "$DEMO_PROFILE" >/dev/null 2>&1 \
|
||||
|| lxc storage volume show default backups >/dev/null 2>&1 \
|
||||
|| lxc storage volume show default app-data >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# The data to protect: an "app" instance writing in its app-data volume
|
||||
demo_app() {
|
||||
lxc storage volume create default app-data size=5GiB >/dev/null
|
||||
lxc launch ubuntu:lts app >/dev/null
|
||||
lxc storage volume attach default app-data app /srv/app
|
||||
lxc exec app -- sh -c 'mkdir -p /srv/app/documents && cp -r /usr/share/doc/bash /usr/share/common-licenses /srv/app/documents/ && echo "Hello from app" > /srv/app/notes.txt'
|
||||
}
|
||||
|
||||
# What the install demo does: the backrest instance with its two volumes
|
||||
demo_backrest_instance() {
|
||||
mise run install --yes "$DEMO_PROFILE" >/dev/null
|
||||
lxc storage volume create default backups size=20GiB >/dev/null
|
||||
lxc launch ubuntu:lts backrest --profile default --profile "$DEMO_PROFILE" >/dev/null
|
||||
lxc config device add backrest backups disk pool=default source=backups path=/backups >/dev/null
|
||||
lxc config device add backrest app-data disk pool=default source=app-data path=/backup/app-data readonly=true >/dev/null
|
||||
demo_wait_cloud_init backrest
|
||||
}
|
||||
|
||||
# What is done in the web UI: repository and plan, here from a configuration
|
||||
# file, then one snapshot taken as backrest would
|
||||
demo_backrest_config() {
|
||||
lxc exec backrest -- sh -c "cat > /etc/backrest/config.json" <<JSON
|
||||
{"version": 6, "instance": "backrest",
|
||||
"repos": [{"id": "local", "uri": "/backups/restic", "password": "$DEMO_REPO_PASSWORD", "autoInitialize": true}],
|
||||
"plans": [{"id": "app-data", "repo": "local", "paths": ["/backup/app-data"],
|
||||
"schedule": {"cron": "0 3 * * *", "clock": "CLOCK_LOCAL"},
|
||||
"retention": {"policyTimeBucketed": {"daily": 30, "monthly": 12}}}],
|
||||
"auth": {"disabled": true}}
|
||||
JSON
|
||||
lxc exec backrest -- systemctl restart backrest
|
||||
until lxc exec backrest -- test -f /backups/restic/config; do sleep 1; done
|
||||
lxc exec backrest --env RESTIC_PASSWORD="$DEMO_REPO_PASSWORD" -- restic --repo /backups/restic --quiet \
|
||||
backup /backup/app-data --host backrest --tag plan:app-data --tag created-by:backrest >/dev/null
|
||||
}
|
||||
|
||||
if demo_exists && [ "$1" != restore ]; then
|
||||
echo "Instance backrest or app, profile $DEMO_PROFILE or volume backups or app-data already exists in LXD: the demo would remove them" >&2
|
||||
exit 1
|
||||
fi
|
||||
case "$1" in
|
||||
install)
|
||||
DEMO_CREATED=yes
|
||||
demo_app
|
||||
;;
|
||||
ui)
|
||||
DEMO_CREATED=yes
|
||||
demo_app
|
||||
demo_backrest_instance
|
||||
;;
|
||||
restore)
|
||||
if ! demo_exists; then
|
||||
DEMO_CREATED=yes
|
||||
demo_app
|
||||
demo_backrest_instance
|
||||
demo_backrest_config
|
||||
fi
|
||||
demo_instance_shell backrest
|
||||
;;
|
||||
esac
|
||||
|
||||
demo_cleanup() {
|
||||
if [ -n "$DEMO_CREATED" ]; then
|
||||
lxc delete --force backrest app >/dev/null 2>&1
|
||||
lxc storage volume delete default backups >/dev/null 2>&1
|
||||
lxc storage volume delete default app-data >/dev/null 2>&1
|
||||
lxc profile delete "$DEMO_PROFILE" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
After Width: | Height: | Size: 75 KiB |
@@ -24,7 +24,8 @@ if prompt and first and not first[2].startswith(prompt):
|
||||
events.insert(0, [0.0, "o", prompt])
|
||||
if prompt:
|
||||
for event in events:
|
||||
if event[1] == "o" and event[2].endswith("\x1b[2J\x1b[3J"):
|
||||
# Only autocast's own !Clear (a clear run in the shell redraws its prompt)
|
||||
if event[1] == "o" and event[2] == "\r\x1b[H\x1b[2J\x1b[3J":
|
||||
event[2] += prompt
|
||||
|
||||
shift, previous = 0.0, 0.0
|
||||
|
||||
@@ -13,6 +13,8 @@ by itself at first boot, then use it.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](install.cast)</sub>
|
||||
|
||||
## What you need
|
||||
|
||||
- **LXD**, installed and initialized, with a user allowed to use it (member of
|
||||
@@ -20,7 +22,7 @@ by itself at first boot, then use it.
|
||||
|
||||
```shell
|
||||
sudo snap install lxd
|
||||
sudo usermod -aG lxd "$USER" # then log in again
|
||||
sudo usermod --append --groups lxd "$USER" # then log in again
|
||||
sudo lxd init --auto # default storage pool and lxdbr0 bridge
|
||||
```
|
||||
|
||||
@@ -62,7 +64,7 @@ Let's first see what the repository offers around Docker, and what is already
|
||||
installed in LXD:
|
||||
|
||||
```shell
|
||||
mise run list | grep -E 'PROFIL|docker'
|
||||
mise run list | grep --extended-regexp 'PROFIL|docker'
|
||||
```
|
||||
|
||||
```
|
||||
@@ -124,38 +126,38 @@ Install it in LXD:
|
||||
|
||||
```shell
|
||||
mise run install docker-unprivileged
|
||||
mise run list | grep -E 'PROFIL|docker-unprivileged' # ✅: up to date in LXD
|
||||
mise run list | grep --extended-regexp 'PROFIL|docker-unprivileged' # ✅: up to date in LXD
|
||||
```
|
||||
|
||||
## 3. Launch the instance and follow its installation
|
||||
|
||||
`ubuntu:lts` is the latest Ubuntu LTS release (26.04 at the time of writing).
|
||||
A profile is added at launch, after the `default` profile (which brings the
|
||||
disk and the network):
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged
|
||||
```
|
||||
|
||||
The instance starts in seconds, but cloud-init is still working in the
|
||||
background: package upgrade, then Docker installation, about a minute and a
|
||||
half. To wait for the end:
|
||||
background: package upgrade, then Docker installation, about a minute. To wait
|
||||
for the end and get the summary, errors included (`errors: []` when all went
|
||||
well):
|
||||
|
||||
```shell
|
||||
lxc exec docker -- cloud-init status --wait # one dot per second, then "status: done"
|
||||
lxc exec docker -- cloud-init status --wait --long
|
||||
```
|
||||
|
||||
To follow the installation live, the cloud-init log reads like any file
|
||||
(Ctrl+C to stop):
|
||||
To follow the installation live instead, the cloud-init log reads like any
|
||||
file (Ctrl+C to stop):
|
||||
|
||||
```shell
|
||||
lxc exec docker -- tail -f /var/log/cloud-init-output.log
|
||||
lxc exec docker -- tail --follow /var/log/cloud-init-output.log
|
||||
```
|
||||
|
||||
And if something goes wrong, `cloud-init status --long` sums up the errors.
|
||||
Once done:
|
||||
Once done, Docker is there:
|
||||
|
||||
```shell
|
||||
lxc exec docker -- tail -n 1 /var/log/cloud-init-output.log
|
||||
lxc exec docker -- docker version --format 'Docker {{.Server.Version}}'
|
||||
lxc list docker
|
||||
```
|
||||
@@ -167,6 +169,8 @@ and the `docker0` bridge Docker just created inside.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [asciinema recording](usage.cast)</sub>
|
||||
|
||||
### From the host, with `lxc exec`
|
||||
|
||||
`lxc exec <instance> -- <command>` runs a command in the instance, without SSH
|
||||
@@ -186,41 +190,147 @@ lxc shell docker
|
||||
```
|
||||
|
||||
```shell
|
||||
docker run -d --name web -p 8080:80 nginx:alpine # a web server in the background
|
||||
docker run --detach --name web --publish 8080:80 nginx:alpine # a web server in the background
|
||||
docker image ls # downloaded images
|
||||
docker ps # running containers
|
||||
docker top web -o pid,user,args # processes of the web container
|
||||
docker top web --format pid,user,args # processes of the web container
|
||||
docker stats --no-stream # CPU, memory, network
|
||||
curl -s localhost:8080 | grep title # nginx answers
|
||||
curl --silent localhost:8080 | grep title # nginx answers
|
||||
exit # back to the host
|
||||
```
|
||||
|
||||
## Going further
|
||||
|
||||
- **Reach the service from the host.** Port 8080 is published by Docker inside
|
||||
the instance. An LXD `proxy` device makes it reachable on the host (and so
|
||||
from your network):
|
||||
### Reach the service from the host
|
||||
|
||||
Port 8080 is published by Docker inside the instance. An LXD `proxy` device
|
||||
makes it reachable on the host (and so from your network):
|
||||
|
||||
```shell
|
||||
lxc config device add docker web proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:8080
|
||||
curl -s localhost:8080 | grep title
|
||||
curl --silent localhost:8080 | grep title
|
||||
```
|
||||
|
||||
If port 8080 is already taken on the host, change the `listen` one. The
|
||||
repository also has ready-made profiles for that (`proxy-http`,
|
||||
`proxy-https`).
|
||||
- **Combine profiles.** Profiles stack at launch: instance size
|
||||
(`size-small`, `size-medium`…), automatic snapshots (`snapshots-daily`), a
|
||||
dedicated volume for Docker data (`docker-volume-data`)…
|
||||
|
||||
### Keep Docker data in a volume, with automatic snapshots
|
||||
|
||||
By default, Docker images, containers and volumes live in `/var/lib/docker`,
|
||||
on the instance disk: they go away with it. The `docker-volume-data` profile
|
||||
mounts a dedicated LXD volume there instead, with a life of its own: it
|
||||
survives the instance deletion, attaches to a new one, and is backed up
|
||||
separately.
|
||||
|
||||
The volume must exist **before** the profile is installed, LXD checks it.
|
||||
Create it on the `default` pool, the one the profile expects, and schedule
|
||||
snapshots for it: one a day, kept for two weeks.
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged -p size-medium -p snapshots-daily
|
||||
lxc storage volume create default docker-data size=20GiB
|
||||
lxc storage volume set default docker-data snapshots.schedule=@daily snapshots.expiry=2w
|
||||
mise run install docker-volume-data
|
||||
```
|
||||
- **Clean up.** The instance goes away with one command, Docker and its images
|
||||
with it; the profile too, if no longer needed:
|
||||
|
||||
Add the profile **when the instance is created**, so that Docker installs
|
||||
directly on the volume:
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged --profile docker-volume-data
|
||||
lxc exec docker -- findmnt --target /var/lib/docker # the volume is mounted
|
||||
```
|
||||
|
||||
Volume snapshots are handled with `lxc storage volume`:
|
||||
|
||||
```shell
|
||||
lxc storage volume snapshot default docker-data before-upgrade # manual snapshot
|
||||
lxc storage volume info default docker-data # list of snapshots
|
||||
lxc stop docker # instance stopped to restore
|
||||
lxc storage volume restore default docker-data before-upgrade
|
||||
lxc start docker
|
||||
```
|
||||
|
||||
The `snapshots-daily` profile is not enough here: it schedules snapshots of
|
||||
the **instance**, which do not include attached volumes. These are two
|
||||
separate settings, and both can be combined.
|
||||
|
||||
### Adapt an installed profile to your needs
|
||||
|
||||
The repository profiles are a starting point. Say you want Docker data on
|
||||
another, faster pool named `fast`. Copy the volume (with its snapshots and
|
||||
their schedule), then change the profile installed in LXD directly:
|
||||
|
||||
```shell
|
||||
lxc stop docker
|
||||
lxc storage volume copy default/docker-data fast/docker-data
|
||||
lxc profile device set docker-volume-data docker-data pool=fast
|
||||
lxc start docker
|
||||
lxc storage volume delete default docker-data # once checked
|
||||
```
|
||||
|
||||
The volume is **copied** rather than moved: LXD refuses to move a volume a
|
||||
profile refers to. The change applies to every instance using the profile.
|
||||
|
||||
The installed profile no longer matches the repository, and the mise tasks
|
||||
say so:
|
||||
|
||||
```shell
|
||||
mise run list | grep docker-volume-data # 📝: installed but different
|
||||
mise run diff docker-volume-data
|
||||
```
|
||||
|
||||
```diff
|
||||
--- lxd:docker-volume-data (installé)
|
||||
+++ profiles/containerization/docker-volume-data.profile.yaml (dépôt)
|
||||
@@ -3,7 +3,7 @@
|
||||
devices:
|
||||
docker-data:
|
||||
path: /var/lib/docker
|
||||
- pool: fast
|
||||
+ pool: default
|
||||
source: docker-data
|
||||
type: disk
|
||||
```
|
||||
|
||||
Two options then:
|
||||
|
||||
- **back to the repository version**: `mise run install docker-volume-data`
|
||||
shows this diff and asks for confirmation before overwriting the profile;
|
||||
- **keep your version**: `mise run import docker-volume-data` rewrites the
|
||||
repository file from the installed profile. Review it with `git diff`, then
|
||||
commit it in your clone (or your fork).
|
||||
|
||||
LXD lets several instances attach the same volume, but two Docker daemons must
|
||||
never share the same `/var/lib/docker`. For a second Docker instance, copy the
|
||||
profile and give it its own volume:
|
||||
|
||||
```shell
|
||||
lxc storage volume create default docker2-data
|
||||
lxc profile copy docker-volume-data docker2-volume-data
|
||||
lxc profile device set docker2-volume-data docker-data source=docker2-data
|
||||
```
|
||||
|
||||
### Combine profiles
|
||||
|
||||
Profiles stack at launch: instance size (`size-small`, `size-medium`…),
|
||||
automatic instance snapshots (`snapshots-daily`), data volume
|
||||
(`docker-volume-data`)…
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged \
|
||||
--profile docker-volume-data --profile size-medium --profile snapshots-daily
|
||||
```
|
||||
|
||||
### Clean up
|
||||
|
||||
The instance goes away with one command, Docker with it. The data volume
|
||||
stays: delete it explicitly if no longer needed, like the profiles.
|
||||
|
||||
```shell
|
||||
lxc delete --force docker
|
||||
lxc storage volume delete default docker-data
|
||||
lxc profile delete docker-volume-data
|
||||
lxc profile delete docker-unprivileged
|
||||
```
|
||||
|
||||
@@ -231,7 +341,7 @@ The repository files are regular LXD profiles: `lxc` is enough.
|
||||
```shell
|
||||
lxc profile create docker-unprivileged
|
||||
lxc profile edit docker-unprivileged < profiles/containerization/docker-unprivileged.profile.yaml
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged
|
||||
```
|
||||
|
||||
## Replaying the demos
|
||||
|
||||
@@ -13,6 +13,8 @@ seule au premier démarrage, puis on s'en sert.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](install.cast)</sub>
|
||||
|
||||
## Ce qu'il vous faut
|
||||
|
||||
- **LXD**, installé et initialisé, avec un utilisateur qui a le droit de
|
||||
@@ -20,7 +22,7 @@ seule au premier démarrage, puis on s'en sert.
|
||||
|
||||
```shell
|
||||
sudo snap install lxd
|
||||
sudo usermod -aG lxd "$USER" # puis se reconnecter
|
||||
sudo usermod --append --groups lxd "$USER" # puis se reconnecter
|
||||
sudo lxd init --auto # pool de stockage et bridge lxdbr0 par défaut
|
||||
```
|
||||
|
||||
@@ -62,7 +64,7 @@ Commençons par voir ce que le dépôt propose autour de Docker, et ce qui est d
|
||||
installé dans LXD :
|
||||
|
||||
```shell
|
||||
mise run list | grep -E 'PROFIL|docker'
|
||||
mise run list | grep --extended-regexp 'PROFIL|docker'
|
||||
```
|
||||
|
||||
```
|
||||
@@ -124,38 +126,38 @@ On l'installe dans LXD :
|
||||
|
||||
```shell
|
||||
mise run install docker-unprivileged
|
||||
mise run list | grep -E 'PROFIL|docker-unprivileged' # ✅ : à jour dans LXD
|
||||
mise run list | grep --extended-regexp 'PROFIL|docker-unprivileged' # ✅ : à jour dans LXD
|
||||
```
|
||||
|
||||
## 3. Lancer l'instance et suivre son installation
|
||||
|
||||
Un profil s'ajoute au lancement, après le profil `default` (qui apporte le disque
|
||||
et le réseau) :
|
||||
`ubuntu:lts` désigne la dernière version LTS d'Ubuntu (26.04 à l'écriture de ces
|
||||
lignes). Un profil s'ajoute au lancement, après le profil `default` (qui
|
||||
apporte le disque et le réseau) :
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged
|
||||
```
|
||||
|
||||
L'instance démarre en quelques secondes, mais cloud-init travaille encore en
|
||||
arrière-plan : mise à jour des paquets puis installation de Docker, environ une
|
||||
minute et demie. Pour attendre la fin :
|
||||
minute. Pour attendre la fin et obtenir le bilan, erreurs éventuelles comprises
|
||||
(`errors: []` quand tout s'est bien passé) :
|
||||
|
||||
```shell
|
||||
lxc exec docker -- cloud-init status --wait # un point par seconde, puis « status: done »
|
||||
lxc exec docker -- cloud-init status --wait --long
|
||||
```
|
||||
|
||||
Pour suivre l'installation en direct, le journal de cloud-init se lit comme
|
||||
n'importe quel fichier (Ctrl+C pour arrêter) :
|
||||
Pour suivre plutôt l'installation en direct, le journal de cloud-init se lit
|
||||
comme n'importe quel fichier (Ctrl+C pour arrêter) :
|
||||
|
||||
```shell
|
||||
lxc exec docker -- tail -f /var/log/cloud-init-output.log
|
||||
lxc exec docker -- tail --follow /var/log/cloud-init-output.log
|
||||
```
|
||||
|
||||
Et si quelque chose se passe mal, `cloud-init status --long` résume les erreurs.
|
||||
Une fois terminé :
|
||||
Une fois terminé, Docker est là :
|
||||
|
||||
```shell
|
||||
lxc exec docker -- tail -n 1 /var/log/cloud-init-output.log
|
||||
lxc exec docker -- docker version --format 'Docker {{.Server.Version}}'
|
||||
lxc list docker
|
||||
```
|
||||
@@ -167,6 +169,8 @@ LXD, et celle du bridge `docker0` que Docker vient de créer à l'intérieur.
|
||||
|
||||

|
||||
|
||||
<sub>▶ [Enregistrement asciinema](usage.cast)</sub>
|
||||
|
||||
### Depuis l'hôte, avec `lxc exec`
|
||||
|
||||
`lxc exec <instance> -- <commande>` exécute une commande dans l'instance, sans
|
||||
@@ -186,41 +190,149 @@ lxc shell docker
|
||||
```
|
||||
|
||||
```shell
|
||||
docker run -d --name web -p 8080:80 nginx:alpine # un serveur web en arrière-plan
|
||||
docker run --detach --name web --publish 8080:80 nginx:alpine # un serveur web en arrière-plan
|
||||
docker image ls # images téléchargées
|
||||
docker ps # conteneurs en cours
|
||||
docker top web -o pid,user,args # processus du conteneur web
|
||||
docker top web --format pid,user,args # processus du conteneur web
|
||||
docker stats --no-stream # CPU, mémoire, réseau
|
||||
curl -s localhost:8080 | grep title # nginx répond
|
||||
curl --silent localhost:8080 | grep title # nginx répond
|
||||
exit # retour sur l'hôte
|
||||
```
|
||||
|
||||
## Pour aller plus loin
|
||||
|
||||
- **Accéder au service depuis l'hôte.** Le port 8080 publié par Docker l'est
|
||||
dans l'instance. Un device `proxy` LXD le rend joignable sur l'hôte (et donc
|
||||
depuis votre réseau) :
|
||||
### Accéder au service depuis l'hôte
|
||||
|
||||
Le port 8080 publié par Docker l'est dans l'instance. Un device `proxy` LXD le
|
||||
rend joignable sur l'hôte (et donc depuis votre réseau) :
|
||||
|
||||
```shell
|
||||
lxc config device add docker web proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:8080
|
||||
curl -s localhost:8080 | grep title
|
||||
curl --silent localhost:8080 | grep title
|
||||
```
|
||||
|
||||
Si le port 8080 est déjà pris sur l'hôte, changez celui de `listen`. Le dépôt
|
||||
propose aussi des profils prêts à l'emploi pour ça (`proxy-http`,
|
||||
`proxy-https`).
|
||||
- **Combiner les profils.** Les profils s'empilent au lancement : taille de
|
||||
l'instance (`size-small`, `size-medium`…), snapshots automatiques
|
||||
(`snapshots-daily`), volume dédié aux données Docker (`docker-volume-data`)…
|
||||
|
||||
### Garder les données Docker dans un volume, avec des snapshots automatiques
|
||||
|
||||
Par défaut, images, conteneurs et volumes Docker vivent dans `/var/lib/docker`,
|
||||
sur le disque de l'instance : ils disparaissent avec elle. Le profil
|
||||
`docker-volume-data` y monte plutôt un volume LXD dédié, qui a sa propre vie :
|
||||
il survit à la suppression de l'instance, se rattache à une nouvelle, et se
|
||||
sauvegarde à part.
|
||||
|
||||
Le volume doit exister **avant** l'installation du profil, LXD le vérifie. On
|
||||
le crée sur le pool `default`, celui qu'attend le profil, et on lui programme
|
||||
des snapshots : un par jour, gardé deux semaines.
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged -p size-medium -p snapshots-daily
|
||||
lxc storage volume create default docker-data size=20GiB
|
||||
lxc storage volume set default docker-data snapshots.schedule=@daily snapshots.expiry=2w
|
||||
mise run install docker-volume-data
|
||||
```
|
||||
- **Faire le ménage.** L'instance se supprime d'une commande, Docker et ses
|
||||
images avec ; le profil, s'il ne sert plus :
|
||||
|
||||
Le profil s'ajoute **à la création** de l'instance, pour que Docker s'installe
|
||||
directement sur le volume :
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged --profile docker-volume-data
|
||||
lxc exec docker -- findmnt --target /var/lib/docker # le volume est bien monté
|
||||
```
|
||||
|
||||
Les snapshots du volume se gèrent avec `lxc storage volume` :
|
||||
|
||||
```shell
|
||||
lxc storage volume snapshot default docker-data avant-maj # snapshot manuel
|
||||
lxc storage volume info default docker-data # liste des snapshots
|
||||
lxc stop docker # instance arrêtée pour restaurer
|
||||
lxc storage volume restore default docker-data avant-maj
|
||||
lxc start docker
|
||||
```
|
||||
|
||||
Le profil `snapshots-daily` ne suffit pas ici : il programme les snapshots de
|
||||
l'**instance**, qui n'incluent pas les volumes attachés. Ce sont deux réglages
|
||||
distincts, et on peut combiner les deux.
|
||||
|
||||
### Adapter un profil installé à son besoin
|
||||
|
||||
Les profils du dépôt sont un point de départ. Imaginons que vous vouliez les
|
||||
données Docker sur un autre pool, plus rapide, nommé `fast`. Le volume se copie
|
||||
(avec ses snapshots et leur programmation), puis on modifie directement le
|
||||
profil installé dans LXD :
|
||||
|
||||
```shell
|
||||
lxc stop docker
|
||||
lxc storage volume copy default/docker-data fast/docker-data
|
||||
lxc profile device set docker-volume-data docker-data pool=fast
|
||||
lxc start docker
|
||||
lxc storage volume delete default docker-data # une fois vérifié
|
||||
```
|
||||
|
||||
Le volume se **copie** plutôt qu'il ne se déplace : LXD refuse de déplacer un
|
||||
volume auquel un profil fait référence. La modification s'applique à toutes les
|
||||
instances qui utilisent le profil.
|
||||
|
||||
Le profil installé ne correspond plus au dépôt, et les tâches mise le
|
||||
signalent :
|
||||
|
||||
```shell
|
||||
mise run list | grep docker-volume-data # 📝 : installé mais différent
|
||||
mise run diff docker-volume-data
|
||||
```
|
||||
|
||||
```diff
|
||||
--- lxd:docker-volume-data (installé)
|
||||
+++ profiles/containerization/docker-volume-data.profile.yaml (dépôt)
|
||||
@@ -3,7 +3,7 @@
|
||||
devices:
|
||||
docker-data:
|
||||
path: /var/lib/docker
|
||||
- pool: fast
|
||||
+ pool: default
|
||||
source: docker-data
|
||||
type: disk
|
||||
```
|
||||
|
||||
Deux options s'offrent alors à vous :
|
||||
|
||||
- **revenir à la version du dépôt** : `mise run install docker-volume-data`
|
||||
affiche ce diff et demande confirmation avant d'écraser le profil ;
|
||||
- **garder votre version** : `mise run import docker-volume-data` réécrit le
|
||||
fichier du dépôt à partir du profil installé. À relire avec `git diff`, puis
|
||||
à commiter dans votre clone (ou votre fork).
|
||||
|
||||
LXD permet d'attacher un même volume à plusieurs instances, mais deux démons
|
||||
Docker ne doivent jamais partager le même `/var/lib/docker`. Pour une deuxième
|
||||
instance Docker, copiez le profil et donnez-lui son propre volume :
|
||||
|
||||
```shell
|
||||
lxc storage volume create default docker2-data
|
||||
lxc profile copy docker-volume-data docker2-volume-data
|
||||
lxc profile device set docker2-volume-data docker-data source=docker2-data
|
||||
```
|
||||
|
||||
### Combiner les profils
|
||||
|
||||
Les profils s'empilent au lancement : taille de l'instance (`size-small`,
|
||||
`size-medium`…), snapshots automatiques de l'instance (`snapshots-daily`),
|
||||
volume de données (`docker-volume-data`)…
|
||||
|
||||
```shell
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged \
|
||||
--profile docker-volume-data --profile size-medium --profile snapshots-daily
|
||||
```
|
||||
|
||||
### Faire le ménage
|
||||
|
||||
L'instance se supprime d'une commande, Docker avec. Le volume de données, lui,
|
||||
reste : à supprimer explicitement s'il ne sert plus, comme les profils.
|
||||
|
||||
```shell
|
||||
lxc delete --force docker
|
||||
lxc storage volume delete default docker-data
|
||||
lxc profile delete docker-volume-data
|
||||
lxc profile delete docker-unprivileged
|
||||
```
|
||||
|
||||
@@ -231,7 +343,7 @@ Les fichiers du dépôt sont des profils LXD ordinaires : `lxc` suffit.
|
||||
```shell
|
||||
lxc profile create docker-unprivileged
|
||||
lxc profile edit docker-unprivileged < profiles/containerization/docker-unprivileged.profile.yaml
|
||||
lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged
|
||||
lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged
|
||||
```
|
||||
|
||||
## Rejouer les démos
|
||||
|
||||
|
Before Width: | Height: | Size: 902 KiB After Width: | Height: | Size: 887 KiB |
@@ -30,19 +30,18 @@ instructions:
|
||||
- !Clear
|
||||
- !Marker Profile
|
||||
- !Command {command: "# Docker profiles available in the repository, not installed in LXD yet"}
|
||||
- !Command {command: "mise run list | grep -E 'PROFIL|docker'"}
|
||||
- !Command {command: "mise run list | grep --extended-regexp 'PROFIL|docker'"}
|
||||
- !Wait 3s
|
||||
- !Command {command: "mise run show docker-unprivileged"}
|
||||
- !Wait 4s
|
||||
- !Command {command: "mise run install docker-unprivileged"}
|
||||
- !Command {command: "mise run list | grep -E 'PROFIL|docker-unprivileged'"}
|
||||
- !Command {command: "mise run list | grep --extended-regexp 'PROFIL|docker-unprivileged'"}
|
||||
- !Wait 3s
|
||||
- !Clear
|
||||
- !Marker Launch
|
||||
- !Command {command: "# Launch an instance with the profile: cloud-init installs Docker at first boot"}
|
||||
- !Command {command: "lxc launch ubuntu:24.04 docker -p default -p docker-unprivileged"}
|
||||
- !Command {command: "lxc exec docker -- cloud-init status --wait"}
|
||||
- !Command {command: "lxc exec docker -- tail -n 1 /var/log/cloud-init-output.log"}
|
||||
- !Command {command: "lxc launch ubuntu:lts docker --profile default --profile docker-unprivileged"}
|
||||
- !Command {command: "lxc exec docker -- cloud-init status --wait --long"}
|
||||
- !Wait 2s
|
||||
- !Command {command: "lxc exec docker -- docker version --format 'Docker {{.Server.Version}}'"}
|
||||
- !Command {command: "lxc list docker"}
|
||||
|
||||
@@ -4,20 +4,12 @@
|
||||
# source demo/docker/setup.sh usage # instance "docker" ready (created if missing)
|
||||
# demo_cleanup (epilogue) removes what the demo created.
|
||||
eval "$(mise activate bash)"
|
||||
source demo/lib.sh
|
||||
DEMO_INSTANCE=docker
|
||||
DEMO_PROFILE=docker-unprivileged
|
||||
DEMO_REPO=$PWD
|
||||
DEMO_CREATED=
|
||||
|
||||
# Root shell of the instance, made recordable: its prompt ends with the marker
|
||||
# autocast waits for, and its input is not echoed twice (no readline, no tty echo)
|
||||
demo_instance_shell() {
|
||||
lxc exec "$DEMO_INSTANCE" -- sh -c "cat >> /root/.bashrc" <<'RC'
|
||||
PS1='\[\e[1;32m\]root@docker\[\e[0m\]:\w# AUTOCAST_PROMPT'
|
||||
set +o emacs; stty -echo
|
||||
RC
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
if lxc info "$DEMO_INSTANCE" >/dev/null 2>&1 || lxc profile show "$DEMO_PROFILE" >/dev/null 2>&1; then
|
||||
@@ -32,10 +24,10 @@ case "$1" in
|
||||
if ! lxc info "$DEMO_INSTANCE" >/dev/null 2>&1; then
|
||||
DEMO_CREATED=yes
|
||||
mise run install --yes "$DEMO_PROFILE" >/dev/null
|
||||
lxc launch ubuntu:24.04 "$DEMO_INSTANCE" -p default -p "$DEMO_PROFILE" >/dev/null
|
||||
lxc exec "$DEMO_INSTANCE" -- cloud-init status --wait >/dev/null
|
||||
lxc launch ubuntu:lts "$DEMO_INSTANCE" --profile default --profile "$DEMO_PROFILE" >/dev/null
|
||||
demo_wait_cloud_init "$DEMO_INSTANCE"
|
||||
fi
|
||||
demo_instance_shell
|
||||
demo_instance_shell "$DEMO_INSTANCE"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"version": 2, "width": 156, "height": 36, "timestamp": 1795282611, "duration": 37.680604, "env": {"TERM": "xterm-256color", "PROMPT_COMMAND": "bind 'set enable-bracketed-paste off'", "SHELL": "/usr/bin/bash", "PS1": "\\[\\e[1;34m\\]lxd\\[\\e[0m\\] > AUTOCAST_PROMPT"}}
|
||||
{"version": 2, "width": 156, "height": 36, "timestamp": 1795286979, "duration": 38.410937, "env": {"PS1": "\\[\\e[1;34m\\]lxd\\[\\e[0m\\] > AUTOCAST_PROMPT", "PROMPT_COMMAND": "bind 'set enable-bracketed-paste off'", "TERM": "xterm-256color", "SHELL": "/usr/bin/bash"}}
|
||||
[0.0, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[0.0, "o", ""]
|
||||
[0.0, "m", "Exec"]
|
||||
@@ -48,407 +48,453 @@
|
||||
[1.54, "o", "s"]
|
||||
[1.575, "o", "t"]
|
||||
[1.61, "o", "\r\n"]
|
||||
[1.613729, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[1.613729, "o", ""]
|
||||
[1.648729, "o", "l"]
|
||||
[1.683729, "o", "x"]
|
||||
[1.718729, "o", "c"]
|
||||
[1.753729, "o", " "]
|
||||
[1.788729, "o", "e"]
|
||||
[1.823729, "o", "x"]
|
||||
[1.858729, "o", "e"]
|
||||
[1.893729, "o", "c"]
|
||||
[1.928729, "o", " "]
|
||||
[1.963729, "o", "d"]
|
||||
[1.998729, "o", "o"]
|
||||
[2.033729, "o", "c"]
|
||||
[2.068729, "o", "k"]
|
||||
[2.103729, "o", "e"]
|
||||
[2.138729, "o", "r"]
|
||||
[2.173729, "o", " "]
|
||||
[2.208729, "o", "-"]
|
||||
[2.243729, "o", "-"]
|
||||
[2.278729, "o", " "]
|
||||
[2.313729, "o", "d"]
|
||||
[2.348729, "o", "o"]
|
||||
[2.383729, "o", "c"]
|
||||
[2.418729, "o", "k"]
|
||||
[2.453729, "o", "e"]
|
||||
[2.488729, "o", "r"]
|
||||
[2.523729, "o", " "]
|
||||
[2.558729, "o", "r"]
|
||||
[2.593729, "o", "u"]
|
||||
[2.628729, "o", "n"]
|
||||
[2.663729, "o", " "]
|
||||
[2.698729, "o", "-"]
|
||||
[2.733729, "o", "-"]
|
||||
[2.768729, "o", "r"]
|
||||
[2.803729, "o", "m"]
|
||||
[2.838729, "o", " "]
|
||||
[2.873729, "o", "h"]
|
||||
[2.908729, "o", "e"]
|
||||
[2.943729, "o", "l"]
|
||||
[2.978729, "o", "l"]
|
||||
[3.013729, "o", "o"]
|
||||
[3.048729, "o", "-"]
|
||||
[3.083729, "o", "w"]
|
||||
[3.118729, "o", "o"]
|
||||
[3.153729, "o", "r"]
|
||||
[3.188729, "o", "l"]
|
||||
[3.223729, "o", "d"]
|
||||
[3.258729, "o", "\r\n"]
|
||||
[3.508599, "o", "Unable to find image 'hello-world:latest' locally\r\n"]
|
||||
[4.323996, "o", "latest: Pulling from library/hello-world\r\n"]
|
||||
[4.939573, "o", "\r\n\u001b[1A\u001b[2K\r4f55086f7dd0: Pulling fs layer \r\u001b[1B"]
|
||||
[5.333953, "o", "\u001b[1A\u001b[2K\r4f55086f7dd0: Download complete \r\u001b[1B\u001b[1A\u001b[2K\r4f55086f7dd0: Pull complete \r\u001b[1B"]
|
||||
[5.532067, "o", "\r\n\u001b[1A\u001b[2K\rd5e71e642bf5: "]
|
||||
[5.532075, "o", "Download complete \r\u001b[1B"]
|
||||
[5.549241, "o", "Digest: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa\r\nStatus: Downloaded newer image for hello-world:latest\r\n"]
|
||||
[5.975424, "o", "\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n\r\nTo generate this message, Docker took the following steps:\r\n 1. The Docker client contacted the Docker daemon.\r\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\r\n (amd64)\r\n 3. The Docker daemon created a new container from that image which runs the\r\n executable that produces the output you are currently reading.\r\n 4. The Docker daemon streamed that output to the Docker client, which sent it\r\n to your terminal.\r\n\r\nTo try something more ambitious, you can run an Ubuntu container with:\r\n $ docker run -it ubuntu bash\r\n\r\nShare images, automate workflows, and more with a free Docker ID:\r\n https://hub.docker.com/\r\n\r\nFor more examples and ideas, visit:\r\n https://docs.docker.com/get-started/\r\n\r\n"]
|
||||
[6.195088, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[6.195089, "o", ""]
|
||||
[10.230089, "o", "\r\u001b[H\u001b[2J\u001b[3J\u001b[1;34mlxd\u001b[0m > "]
|
||||
[10.265089, "o", ""]
|
||||
[10.265089, "m", "Shell"]
|
||||
[10.300089, "o", "#"]
|
||||
[10.335089, "o", " "]
|
||||
[10.370089, "o", "O"]
|
||||
[10.405089, "o", "r"]
|
||||
[10.440089, "o", " "]
|
||||
[10.475089, "o", "o"]
|
||||
[10.510089, "o", "p"]
|
||||
[10.545089, "o", "e"]
|
||||
[10.580089, "o", "n"]
|
||||
[10.615089, "o", " "]
|
||||
[10.650089, "o", "a"]
|
||||
[10.685089, "o", " "]
|
||||
[10.720089, "o", "s"]
|
||||
[10.755089, "o", "h"]
|
||||
[10.790089, "o", "e"]
|
||||
[10.825089, "o", "l"]
|
||||
[10.860089, "o", "l"]
|
||||
[10.895089, "o", " "]
|
||||
[10.930089, "o", "i"]
|
||||
[10.965089, "o", "n"]
|
||||
[11.000089, "o", " "]
|
||||
[11.035089, "o", "t"]
|
||||
[11.070089, "o", "h"]
|
||||
[11.105089, "o", "e"]
|
||||
[11.140089, "o", " "]
|
||||
[11.175089, "o", "i"]
|
||||
[11.210089, "o", "n"]
|
||||
[11.245089, "o", "s"]
|
||||
[11.280089, "o", "t"]
|
||||
[11.315089, "o", "a"]
|
||||
[11.350089, "o", "n"]
|
||||
[11.385089, "o", "c"]
|
||||
[11.420089, "o", "e"]
|
||||
[11.455089, "o", " "]
|
||||
[11.490089, "o", "a"]
|
||||
[11.525089, "o", "n"]
|
||||
[11.560089, "o", "d"]
|
||||
[11.595089, "o", " "]
|
||||
[11.630089, "o", "u"]
|
||||
[11.665089, "o", "s"]
|
||||
[11.700089, "o", "e"]
|
||||
[11.735089, "o", " "]
|
||||
[11.770089, "o", "D"]
|
||||
[11.805089, "o", "o"]
|
||||
[11.840089, "o", "c"]
|
||||
[11.875089, "o", "k"]
|
||||
[11.910089, "o", "e"]
|
||||
[11.945089, "o", "r"]
|
||||
[11.980089, "o", " "]
|
||||
[12.015089, "o", "a"]
|
||||
[12.050089, "o", "s"]
|
||||
[12.085089, "o", " "]
|
||||
[12.120089, "o", "o"]
|
||||
[12.155089, "o", "n"]
|
||||
[12.190089, "o", " "]
|
||||
[12.225089, "o", "a"]
|
||||
[12.260089, "o", "n"]
|
||||
[12.295089, "o", "y"]
|
||||
[12.330089, "o", " "]
|
||||
[12.365089, "o", "m"]
|
||||
[12.400089, "o", "a"]
|
||||
[12.435089, "o", "c"]
|
||||
[12.470089, "o", "h"]
|
||||
[12.505089, "o", "i"]
|
||||
[12.540089, "o", "n"]
|
||||
[12.575089, "o", "e"]
|
||||
[12.610089, "o", "\r\n"]
|
||||
[12.6133, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[12.6133, "o", ""]
|
||||
[12.6483, "o", "l"]
|
||||
[12.6833, "o", "x"]
|
||||
[12.7183, "o", "c"]
|
||||
[12.7533, "o", " "]
|
||||
[12.7883, "o", "s"]
|
||||
[12.8233, "o", "h"]
|
||||
[12.8583, "o", "e"]
|
||||
[12.8933, "o", "l"]
|
||||
[12.9283, "o", "l"]
|
||||
[12.9633, "o", " "]
|
||||
[12.9983, "o", "d"]
|
||||
[13.0333, "o", "o"]
|
||||
[13.0683, "o", "c"]
|
||||
[13.1033, "o", "k"]
|
||||
[13.1383, "o", "e"]
|
||||
[13.1733, "o", "r"]
|
||||
[13.2083, "o", "\r\n"]
|
||||
[13.487959, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[13.48796, "o", ""]
|
||||
[13.52296, "o", "d"]
|
||||
[13.55796, "o", "o"]
|
||||
[13.59296, "o", "c"]
|
||||
[13.62796, "o", "k"]
|
||||
[13.66296, "o", "e"]
|
||||
[13.69796, "o", "r"]
|
||||
[13.73296, "o", " "]
|
||||
[13.76796, "o", "r"]
|
||||
[13.80296, "o", "u"]
|
||||
[13.83796, "o", "n"]
|
||||
[13.87296, "o", " "]
|
||||
[13.90796, "o", "-"]
|
||||
[13.94296, "o", "d"]
|
||||
[13.97796, "o", " "]
|
||||
[14.01296, "o", "-"]
|
||||
[14.04796, "o", "-"]
|
||||
[14.08296, "o", "n"]
|
||||
[14.11796, "o", "a"]
|
||||
[14.15296, "o", "m"]
|
||||
[14.18796, "o", "e"]
|
||||
[14.22296, "o", " "]
|
||||
[14.25796, "o", "w"]
|
||||
[14.29296, "o", "e"]
|
||||
[14.32796, "o", "b"]
|
||||
[14.36296, "o", " "]
|
||||
[14.39796, "o", "-"]
|
||||
[14.43296, "o", "p"]
|
||||
[14.46796, "o", " "]
|
||||
[14.50296, "o", "8"]
|
||||
[14.53796, "o", "0"]
|
||||
[14.57296, "o", "8"]
|
||||
[14.60796, "o", "0"]
|
||||
[14.64296, "o", ":"]
|
||||
[14.67796, "o", "8"]
|
||||
[14.71296, "o", "0"]
|
||||
[14.74796, "o", " "]
|
||||
[14.78296, "o", "n"]
|
||||
[14.81796, "o", "g"]
|
||||
[14.85296, "o", "i"]
|
||||
[14.88796, "o", "n"]
|
||||
[14.92296, "o", "x"]
|
||||
[14.95796, "o", ":"]
|
||||
[14.99296, "o", "a"]
|
||||
[15.02796, "o", "l"]
|
||||
[15.06296, "o", "p"]
|
||||
[15.09796, "o", "i"]
|
||||
[15.13296, "o", "n"]
|
||||
[15.16796, "o", "e"]
|
||||
[15.20296, "o", "\r\n"]
|
||||
[15.220856, "o", "Unable to find image 'nginx:alpine' locally\r\n"]
|
||||
[16.015379, "o", "alpine: Pulling from library/nginx\r\n"]
|
||||
[16.382424, "o", "\r\n\u001b[1A\u001b[2K\r881fc932939e: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r61d8f4c85a74: "]
|
||||
[16.383325, "o", "Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r1dc588c89da1: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\rc4f3d97811f6: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r77a3bfea78f5: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r04c3905a997c: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r4c8c172c6586: Pulling fs layer \r\u001b[1B"]
|
||||
[16.383358, "o", "\r\n\u001b[1A\u001b[2K\r7cb374baf968: Pulling fs layer \r\u001b[1B"]
|
||||
[16.646108, "o", "\u001b[7A\u001b[2K\r61d8f4c85a74: Download complete \r\u001b[7B"]
|
||||
[16.646215, "o", "\u001b[8A\u001b[2K\r881fc932939e: Download complete \r\u001b[8B"]
|
||||
[16.646222, "o", "\u001b[6A\u001b[2K\r1dc588c89da1: Downloading [==================================================>] 1.211kB/1.211kB\r\u001b[6B"]
|
||||
[16.646661, "o", "\u001b[8A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[8B"]
|
||||
[16.7513, "o", "\u001b[6A\u001b[2K\r1dc588c89da1: Download complete \r\u001b[6B\u001b[5A\u001b[2K\rc4f3d97811f6: Downloading [============> ] 5.243MB/20.54MB\r\u001b[5B"]
|
||||
[16.753518, "o", "\u001b[8A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[8B"]
|
||||
[16.845026, "o", "\u001b[5A\u001b[2K\rc4f3d97811f6: Downloading [======================================> ] 15.73MB/20.54MB\r\u001b[5B"]
|
||||
[16.84839, "o", "\u001b[4A\u001b[2K\r77a3bfea78f5: Download complete \r\u001b[4B"]
|
||||
[16.848426, "o", "\u001b[2A"]
|
||||
[16.848478, "o", "\u001b[2K\r4c8c172c6586: Download complete \r\u001b[2B"]
|
||||
[16.84929, "o", "\u001b[8A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[8B"]
|
||||
[16.945193, "o", "\u001b[1A\u001b[2K\r7cb374baf968: Downloading [==================================================>] 965B/965B\r\u001b[1B"]
|
||||
[16.945626, "o", "\u001b[3A\u001b[2K\r04c3905a997c: Download complete \r\u001b[3B"]
|
||||
[16.946084, "o", "\u001b[8A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[8B"]
|
||||
[17.04583, "o", "\u001b[5A\u001b[2K"]
|
||||
[17.045851, "o", "\rc4f3d97811f6: Download complete \r\u001b[5B\u001b[1A\u001b[2K\r7cb374baf968: Download complete \r\u001b[1B"]
|
||||
[17.046393, "o", "\u001b[8A\u001b[2K"]
|
||||
[17.046438, "o", "\r881fc932939e: Extracting 1 s\r\u001b[8B"]
|
||||
[17.146048, "o", "\u001b[8A\u001b[2K\r881fc932939e: Pull complete \r\u001b[8B"]
|
||||
[17.248037, "o", "\r\n\u001b[1A\u001b[2K\r79979b969278: Download complete \r\u001b[1B\r\n\u001b[1A\u001b[2K\r33247e384332: Download complete \r\u001b[1B"]
|
||||
[17.24941, "o", "\u001b[6A\u001b[2K\r77a3bfea78f5: Extracting 1 s\r\u001b[6B"]
|
||||
[17.34931, "o", "\u001b[6A\u001b[2K\r77a3bfea78f5: Extracting 1 s\r\u001b[6B"]
|
||||
[17.446575, "o", "\u001b[6A\u001b[2K\r"]
|
||||
[17.446615, "o", "77a3bfea78f5: Pull complete \r\u001b[6B"]
|
||||
[17.447027, "o", "\u001b[5A\u001b[2K\r04c3905a997c: Extracting 1 s\r\u001b[5B"]
|
||||
[17.548262, "o", "\u001b[5A\u001b[2K\r04c3905a997c: Pull complete \r\u001b[5B"]
|
||||
[17.548612, "o", "\u001b[3A\u001b[2K\r7cb374baf968: Pull complete \r\u001b[3B"]
|
||||
[17.647564, "o", "\u001b[8A\u001b[2K\r1dc588c89da1: Extracting 1 s\r\u001b[8B"]
|
||||
[17.647948, "o", "\u001b[4A\u001b[2K\r4c8c172c6586: Pull complete \r\u001b[4B"]
|
||||
[17.745396, "o", "\u001b[8A\u001b[2K\r1dc588c89da1: Pull complete \r\u001b[8B"]
|
||||
[17.845379, "o", "\u001b[9A\u001b[2K\r61d8f4c85a74: Pull complete \r\u001b[9B"]
|
||||
[17.845712, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[17.946718, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[18.046347, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[18.145277, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[18.245237, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[18.347123, "o", "\u001b[7A\u001b[2K"]
|
||||
[18.34812, "o", "\rc4f3d97811f6: Extracting 1 s\r\u001b[7B"]
|
||||
[18.445102, "o", "\u001b[7A\u001b[2K\rc4f3d97811f6: Pull complete \r\u001b[7B"]
|
||||
[18.470357, "o", "Digest: sha256:fb4658584bd9a916ffb6f6e365f97c25cfdb2923801f551ea08356e695f14ff7\r\nStatus: Downloaded newer image for nginx:alpine\r\n"]
|
||||
[18.653218, "o", "4356be02dd2c9bbd03025fb22366e564d780c7622c489e8857b3510e120c78c3\r\n"]
|
||||
[18.876775, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[18.876776, "o", ""]
|
||||
[20.911776, "o", "c"]
|
||||
[20.946776, "o", "l"]
|
||||
[20.981776, "o", "e"]
|
||||
[21.016776, "o", "a"]
|
||||
[21.051776, "o", "r"]
|
||||
[21.086776, "o", "\r\n"]
|
||||
[21.087913, "o", "\u001b[H\u001b[2J\u001b[3J\u001b[1;34mlxd\u001b[0m > "]
|
||||
[21.088026, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[21.088026, "o", ""]
|
||||
[21.123026, "o", "d"]
|
||||
[21.158026, "o", "o"]
|
||||
[21.193026, "o", "c"]
|
||||
[21.228026, "o", "k"]
|
||||
[21.263026, "o", "e"]
|
||||
[21.298026, "o", "r"]
|
||||
[21.333026, "o", " "]
|
||||
[21.368026, "o", "i"]
|
||||
[21.403026, "o", "m"]
|
||||
[21.438026, "o", "a"]
|
||||
[21.473026, "o", "g"]
|
||||
[21.508026, "o", "e"]
|
||||
[21.543026, "o", " "]
|
||||
[21.578026, "o", "l"]
|
||||
[21.613026, "o", "s"]
|
||||
[21.648026, "o", "\r\n"]
|
||||
[21.714674, "o", " \u001b[1m\u001b[106m\u001b[30mi\u001b[0m\u001b[0m \u001b[96mInfo → \u001b[0m\u001b[0m \u001b[38;5;0m\u001b[48;5;14m U \u001b[0m In Use\r\n\u001b[39m\u001b[1mIMAGE\u001b[0m \u001b[39m\u001b[1mID\u001b[0m \u001b[39m\u001b[1mDISK USAGE\u001b[0m \u001b[39m\u001b[1mCONTENT SIZE\u001b[0m \u001b[39m\u001b[1mEXTRA\u001b[0m\r\n\u001b[34m\u001b[1mhello-world:latest\u001b[0m \u001b[39m1e4c05b897a7\u001b[0m "]
|
||||
[21.714735, "o", " \u001b[39m21.8kB\u001b[0m \u001b[39m9.49kB\u001b[0m \r\n\u001b[34m\u001b[1mnginx:alpine\u001b[0m \u001b[39mfb4658584bd9\u001b[0m \u001b[39m95.7MB\u001b[0m \u001b[39m27.2MB\u001b[0m \u001b[38;5;0m\u001b[48;5;14m U \u001b[0m \r\n"]
|
||||
[21.727198, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[21.727198, "o", ""]
|
||||
[21.762198, "o", "d"]
|
||||
[21.797198, "o", "o"]
|
||||
[21.832198, "o", "c"]
|
||||
[21.867198, "o", "k"]
|
||||
[21.902198, "o", "e"]
|
||||
[21.937198, "o", "r"]
|
||||
[21.972198, "o", " "]
|
||||
[22.007198, "o", "p"]
|
||||
[22.042198, "o", "s"]
|
||||
[22.077198, "o", "\r\n"]
|
||||
[22.103539, "o", "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n4356be02dd2c nginx:alpine \"/docker-entrypoint.…\" 1 second ago Up Less than a second 0.0.0.0:8080->80/tcp, [::]:8080->80/tcp web\r\n"]
|
||||
[22.104791, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[22.104791, "o", ""]
|
||||
[25.139791, "o", "d"]
|
||||
[25.174791, "o", "o"]
|
||||
[25.209791, "o", "c"]
|
||||
[25.244791, "o", "k"]
|
||||
[25.279791, "o", "e"]
|
||||
[25.314791, "o", "r"]
|
||||
[25.349791, "o", " "]
|
||||
[25.384791, "o", "t"]
|
||||
[25.419791, "o", "o"]
|
||||
[25.454791, "o", "p"]
|
||||
[25.489791, "o", " "]
|
||||
[25.524791, "o", "w"]
|
||||
[25.559791, "o", "e"]
|
||||
[25.594791, "o", "b"]
|
||||
[25.629791, "o", " "]
|
||||
[25.664791, "o", "-"]
|
||||
[25.699791, "o", "o"]
|
||||
[25.734791, "o", " "]
|
||||
[25.769791, "o", "p"]
|
||||
[25.804791, "o", "i"]
|
||||
[25.839791, "o", "d"]
|
||||
[25.874791, "o", ","]
|
||||
[25.909791, "o", "u"]
|
||||
[25.944791, "o", "s"]
|
||||
[25.979791, "o", "e"]
|
||||
[26.014791, "o", "r"]
|
||||
[26.049791, "o", ","]
|
||||
[26.084791, "o", "a"]
|
||||
[26.119791, "o", "r"]
|
||||
[26.154791, "o", "g"]
|
||||
[26.189791, "o", "s"]
|
||||
[26.224791, "o", "\r\n"]
|
||||
[26.254129, "o", "PID USER COMMAND\r\n10702 root nginx: master process nginx -g daemon off;\r\n10778 message+ nginx: worker process\r\n10779 message+ nginx: worker process\r\n10780 message+ nginx: worker process\r\n10781 "]
|
||||
[26.254218, "o", "message+ nginx: worker process\r\n10782 message+ nginx: worker process\r\n10783 message+ nginx: worker process\r\n10784 message+ "]
|
||||
[26.254253, "o", "nginx: worker process"]
|
||||
[26.254266, "o", "\r\n10786"]
|
||||
[26.254286, "o", " message+ nginx: worker process\r\n"]
|
||||
[26.257188, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[26.257189, "o", ""]
|
||||
[26.292189, "o", "d"]
|
||||
[26.327189, "o", "o"]
|
||||
[26.362189, "o", "c"]
|
||||
[26.397189, "o", "k"]
|
||||
[26.432189, "o", "e"]
|
||||
[26.467189, "o", "r"]
|
||||
[26.502189, "o", " "]
|
||||
[26.537189, "o", "s"]
|
||||
[26.572189, "o", "t"]
|
||||
[26.607189, "o", "a"]
|
||||
[26.642189, "o", "t"]
|
||||
[26.677189, "o", "s"]
|
||||
[26.712189, "o", " "]
|
||||
[26.747189, "o", "-"]
|
||||
[26.782189, "o", "-"]
|
||||
[26.817189, "o", "n"]
|
||||
[26.852189, "o", "o"]
|
||||
[26.887189, "o", "-"]
|
||||
[26.922189, "o", "s"]
|
||||
[26.957189, "o", "t"]
|
||||
[26.992189, "o", "r"]
|
||||
[27.027189, "o", "e"]
|
||||
[27.062189, "o", "a"]
|
||||
[27.097189, "o", "m"]
|
||||
[27.132189, "o", "\r\n"]
|
||||
[28.176777, "o", "CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS\r\n4356be02dd2c web 0.00% 7.477MiB / 30.26GiB 0.02% 646B / 84B 0B / 0B 9\r\n"]
|
||||
[28.177542, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[28.177543, "o", ""]
|
||||
[31.212543, "o", "c"]
|
||||
[31.247543, "o", "u"]
|
||||
[31.282543, "o", "r"]
|
||||
[31.317543, "o", "l"]
|
||||
[31.352543, "o", " "]
|
||||
[31.387543, "o", "-"]
|
||||
[31.422543, "o", "s"]
|
||||
[31.457543, "o", " "]
|
||||
[31.492543, "o", "l"]
|
||||
[31.527543, "o", "o"]
|
||||
[31.562543, "o", "c"]
|
||||
[31.597543, "o", "a"]
|
||||
[31.632543, "o", "l"]
|
||||
[31.667543, "o", "h"]
|
||||
[31.702543, "o", "o"]
|
||||
[31.737543, "o", "s"]
|
||||
[31.772543, "o", "t"]
|
||||
[31.807543, "o", ":"]
|
||||
[31.842543, "o", "8"]
|
||||
[31.877543, "o", "0"]
|
||||
[31.912543, "o", "8"]
|
||||
[31.947543, "o", "0"]
|
||||
[31.982543, "o", " "]
|
||||
[32.017543, "o", "|"]
|
||||
[32.052543, "o", " "]
|
||||
[32.087543, "o", "g"]
|
||||
[32.122543, "o", "r"]
|
||||
[32.157543, "o", "e"]
|
||||
[32.192543, "o", "p"]
|
||||
[32.227543, "o", " "]
|
||||
[32.262543, "o", "t"]
|
||||
[32.297543, "o", "i"]
|
||||
[32.332543, "o", "t"]
|
||||
[32.367543, "o", "l"]
|
||||
[32.402543, "o", "e"]
|
||||
[32.437543, "o", "\r\n"]
|
||||
[32.443973, "o", "<\u001b[01;31m\u001b[Ktitle\u001b[m\u001b[K>Welcome to nginx!</\u001b[01;31m\u001b[Ktitle\u001b[m\u001b[K>\r\n"]
|
||||
[32.444591, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[32.444591, "o", ""]
|
||||
[32.479591, "o", "e"]
|
||||
[32.514591, "o", "x"]
|
||||
[32.549591, "o", "i"]
|
||||
[32.584591, "o", "t"]
|
||||
[32.619591, "o", "\r\n"]
|
||||
[32.619844, "o", "logout\r\n"]
|
||||
[32.645603, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[32.645604, "o", ""]
|
||||
[37.680604, "o", "\r\n"]
|
||||
[1.613552, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[1.613553, "o", ""]
|
||||
[1.648553, "o", "l"]
|
||||
[1.683553, "o", "x"]
|
||||
[1.718553, "o", "c"]
|
||||
[1.753553, "o", " "]
|
||||
[1.788553, "o", "e"]
|
||||
[1.823553, "o", "x"]
|
||||
[1.858553, "o", "e"]
|
||||
[1.893553, "o", "c"]
|
||||
[1.928553, "o", " "]
|
||||
[1.963553, "o", "d"]
|
||||
[1.998553, "o", "o"]
|
||||
[2.033553, "o", "c"]
|
||||
[2.068553, "o", "k"]
|
||||
[2.103553, "o", "e"]
|
||||
[2.138553, "o", "r"]
|
||||
[2.173553, "o", " "]
|
||||
[2.208553, "o", "-"]
|
||||
[2.243553, "o", "-"]
|
||||
[2.278553, "o", " "]
|
||||
[2.313553, "o", "d"]
|
||||
[2.348553, "o", "o"]
|
||||
[2.383553, "o", "c"]
|
||||
[2.418553, "o", "k"]
|
||||
[2.453553, "o", "e"]
|
||||
[2.488553, "o", "r"]
|
||||
[2.523553, "o", " "]
|
||||
[2.558553, "o", "r"]
|
||||
[2.593553, "o", "u"]
|
||||
[2.628553, "o", "n"]
|
||||
[2.663553, "o", " "]
|
||||
[2.698553, "o", "-"]
|
||||
[2.733553, "o", "-"]
|
||||
[2.768553, "o", "r"]
|
||||
[2.803553, "o", "m"]
|
||||
[2.838553, "o", " "]
|
||||
[2.873553, "o", "h"]
|
||||
[2.908553, "o", "e"]
|
||||
[2.943553, "o", "l"]
|
||||
[2.978553, "o", "l"]
|
||||
[3.013553, "o", "o"]
|
||||
[3.048553, "o", "-"]
|
||||
[3.083553, "o", "w"]
|
||||
[3.118553, "o", "o"]
|
||||
[3.153553, "o", "r"]
|
||||
[3.188553, "o", "l"]
|
||||
[3.223553, "o", "d"]
|
||||
[3.258553, "o", "\r\n"]
|
||||
[3.389595, "o", "Unable to find image 'hello-world:latest' locally\r\n"]
|
||||
[4.179716, "o", "latest: Pulling from library/hello-world\r\n"]
|
||||
[4.587887, "o", "\r\n\u001b[1A\u001b[2K\r4f55086f7dd0: Pulling fs layer \r\u001b[1B"]
|
||||
[4.800305, "o", "\u001b[1A\u001b[2K\r4f55086f7dd0: Download complete \r\u001b[1B"]
|
||||
[4.800585, "o", "\u001b[1A\u001b[2K\r4f55086f7dd0: Extracting 1 s\r\u001b[1B"]
|
||||
[4.90106, "o", "\u001b[1A\u001b[2K\r4f55086f7dd0: Pull complete \r\u001b[1B"]
|
||||
[4.999717, "o", "\r\n\u001b[1A\u001b[2K\rd5e71e642bf5: Download complete \r\u001b[1B"]
|
||||
[5.031106, "o", "Digest: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa\r\nStatus: Downloaded newer image for hello-world:latest\r\n"]
|
||||
[5.431539, "o", "\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n\r\nTo generate this message, Docker took the following steps:\r\n 1. The Docker client contacted the Docker daemon.\r\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\r\n (amd64)\r\n 3. The Docker daemon created a new container from that image which runs the\r\n executable that produces the output you are currently reading.\r\n 4. The Docker daemon streamed that output to the Docker client, which sent it\r\n to your terminal.\r\n\r\nTo try something more ambitious, you can run an Ubuntu container with:\r\n $ docker run -it ubuntu bash\r\n\r\nShare images, automate workflows, and more with a free Docker ID:\r\n https://hub.docker.com/\r\n\r\nFor more examples and ideas, visit:\r\n https://docs.docker.com/get-started/\r\n\r\n"]
|
||||
[5.650193, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[5.650194, "o", ""]
|
||||
[9.685194, "o", "\r\u001b[H\u001b[2J\u001b[3J\u001b[1;34mlxd\u001b[0m > "]
|
||||
[9.720194, "o", ""]
|
||||
[9.720194, "m", "Shell"]
|
||||
[9.755194, "o", "#"]
|
||||
[9.790194, "o", " "]
|
||||
[9.825194, "o", "O"]
|
||||
[9.860194, "o", "r"]
|
||||
[9.895194, "o", " "]
|
||||
[9.930194, "o", "o"]
|
||||
[9.965194, "o", "p"]
|
||||
[10.000194, "o", "e"]
|
||||
[10.035194, "o", "n"]
|
||||
[10.070194, "o", " "]
|
||||
[10.105194, "o", "a"]
|
||||
[10.140194, "o", " "]
|
||||
[10.175194, "o", "s"]
|
||||
[10.210194, "o", "h"]
|
||||
[10.245194, "o", "e"]
|
||||
[10.280194, "o", "l"]
|
||||
[10.315194, "o", "l"]
|
||||
[10.350194, "o", " "]
|
||||
[10.385194, "o", "i"]
|
||||
[10.420194, "o", "n"]
|
||||
[10.455194, "o", " "]
|
||||
[10.490194, "o", "t"]
|
||||
[10.525194, "o", "h"]
|
||||
[10.560194, "o", "e"]
|
||||
[10.595194, "o", " "]
|
||||
[10.630194, "o", "i"]
|
||||
[10.665194, "o", "n"]
|
||||
[10.700194, "o", "s"]
|
||||
[10.735194, "o", "t"]
|
||||
[10.770194, "o", "a"]
|
||||
[10.805194, "o", "n"]
|
||||
[10.840194, "o", "c"]
|
||||
[10.875194, "o", "e"]
|
||||
[10.910194, "o", " "]
|
||||
[10.945194, "o", "a"]
|
||||
[10.980194, "o", "n"]
|
||||
[11.015194, "o", "d"]
|
||||
[11.050194, "o", " "]
|
||||
[11.085194, "o", "u"]
|
||||
[11.120194, "o", "s"]
|
||||
[11.155194, "o", "e"]
|
||||
[11.190194, "o", " "]
|
||||
[11.225194, "o", "D"]
|
||||
[11.260194, "o", "o"]
|
||||
[11.295194, "o", "c"]
|
||||
[11.330194, "o", "k"]
|
||||
[11.365194, "o", "e"]
|
||||
[11.400194, "o", "r"]
|
||||
[11.435194, "o", " "]
|
||||
[11.470194, "o", "a"]
|
||||
[11.505194, "o", "s"]
|
||||
[11.540194, "o", " "]
|
||||
[11.575194, "o", "o"]
|
||||
[11.610194, "o", "n"]
|
||||
[11.645194, "o", " "]
|
||||
[11.680194, "o", "a"]
|
||||
[11.715194, "o", "n"]
|
||||
[11.750194, "o", "y"]
|
||||
[11.785194, "o", " "]
|
||||
[11.820194, "o", "m"]
|
||||
[11.855194, "o", "a"]
|
||||
[11.890194, "o", "c"]
|
||||
[11.925194, "o", "h"]
|
||||
[11.960194, "o", "i"]
|
||||
[11.995194, "o", "n"]
|
||||
[12.030194, "o", "e"]
|
||||
[12.065194, "o", "\r\n"]
|
||||
[12.068484, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[12.068484, "o", ""]
|
||||
[12.103484, "o", "l"]
|
||||
[12.138484, "o", "x"]
|
||||
[12.173484, "o", "c"]
|
||||
[12.208484, "o", " "]
|
||||
[12.243484, "o", "s"]
|
||||
[12.278484, "o", "h"]
|
||||
[12.313484, "o", "e"]
|
||||
[12.348484, "o", "l"]
|
||||
[12.383484, "o", "l"]
|
||||
[12.418484, "o", " "]
|
||||
[12.453484, "o", "d"]
|
||||
[12.488484, "o", "o"]
|
||||
[12.523484, "o", "c"]
|
||||
[12.558484, "o", "k"]
|
||||
[12.593484, "o", "e"]
|
||||
[12.628484, "o", "r"]
|
||||
[12.663484, "o", "\r\n"]
|
||||
[12.925736, "o", "\u001b]3008;start=f47dd143b8174c44aef0e85845074248;user=root;hostname=docker;machineid=fee09faa07ad4b838265ae23070d7d35;bootid=d0c476175ddf4367869c1347fa57e1bf;pid=4855;pidfdid=476481;comm=su;targetuser=root;sessionid=c1;type=session\u001b\\"]
|
||||
[12.958744, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[12.958801, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[12.958802, "o", ""]
|
||||
[12.993802, "o", "d"]
|
||||
[13.028802, "o", "o"]
|
||||
[13.063802, "o", "c"]
|
||||
[13.098802, "o", "k"]
|
||||
[13.133802, "o", "e"]
|
||||
[13.168802, "o", "r"]
|
||||
[13.203802, "o", " "]
|
||||
[13.238802, "o", "r"]
|
||||
[13.273802, "o", "u"]
|
||||
[13.308802, "o", "n"]
|
||||
[13.343802, "o", " "]
|
||||
[13.378802, "o", "-"]
|
||||
[13.413802, "o", "-"]
|
||||
[13.448802, "o", "d"]
|
||||
[13.483802, "o", "e"]
|
||||
[13.518802, "o", "t"]
|
||||
[13.553802, "o", "a"]
|
||||
[13.588802, "o", "c"]
|
||||
[13.623802, "o", "h"]
|
||||
[13.658802, "o", " "]
|
||||
[13.693802, "o", "-"]
|
||||
[13.728802, "o", "-"]
|
||||
[13.763802, "o", "n"]
|
||||
[13.798802, "o", "a"]
|
||||
[13.833802, "o", "m"]
|
||||
[13.868802, "o", "e"]
|
||||
[13.903802, "o", " "]
|
||||
[13.938802, "o", "w"]
|
||||
[13.973802, "o", "e"]
|
||||
[14.008802, "o", "b"]
|
||||
[14.043802, "o", " "]
|
||||
[14.078802, "o", "-"]
|
||||
[14.113802, "o", "-"]
|
||||
[14.148802, "o", "p"]
|
||||
[14.183802, "o", "u"]
|
||||
[14.218802, "o", "b"]
|
||||
[14.253802, "o", "l"]
|
||||
[14.288802, "o", "i"]
|
||||
[14.323802, "o", "s"]
|
||||
[14.358802, "o", "h"]
|
||||
[14.393802, "o", " "]
|
||||
[14.428802, "o", "8"]
|
||||
[14.463802, "o", "0"]
|
||||
[14.498802, "o", "8"]
|
||||
[14.533802, "o", "0"]
|
||||
[14.568802, "o", ":"]
|
||||
[14.603802, "o", "8"]
|
||||
[14.638802, "o", "0"]
|
||||
[14.673802, "o", " "]
|
||||
[14.708802, "o", "n"]
|
||||
[14.743802, "o", "g"]
|
||||
[14.778802, "o", "i"]
|
||||
[14.813802, "o", "n"]
|
||||
[14.848802, "o", "x"]
|
||||
[14.883802, "o", ":"]
|
||||
[14.918802, "o", "a"]
|
||||
[14.953802, "o", "l"]
|
||||
[14.988802, "o", "p"]
|
||||
[15.023802, "o", "i"]
|
||||
[15.058802, "o", "n"]
|
||||
[15.093802, "o", "e"]
|
||||
[15.128802, "o", "\r\n"]
|
||||
[15.131429, "o", "\u001b]3008;start=e9896e4b-9153-4d0f-9036-87dcf1fc25b5;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[15.150233, "o", "Unable to find image 'nginx:alpine' locally\r\n"]
|
||||
[15.941977, "o", "alpine: Pulling from library/nginx\r\n"]
|
||||
[16.316446, "o", "\r\n\u001b[1A"]
|
||||
[16.316513, "o", "\u001b[2K\rc4f3d97811f6: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r4c8c172c6586: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r1dc588c89da1: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r04c3905a997c: Pulling fs layer \r"]
|
||||
[16.316611, "o", "\u001b[1B\r\n\u001b[1A\u001b[2K\r881fc932939e: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r77a3bfea78f5: Pulling fs layer \r"]
|
||||
[16.316651, "o", "\u001b[1B\r\n"]
|
||||
[16.31674, "o", "\u001b[1A\u001b[2K\r7cb374baf968: Pulling fs layer \r\u001b[1B\r\n\u001b[1A\u001b[2K\r61d8f4c85a74: Pulling fs layer \r\u001b[1B"]
|
||||
[16.473039, "o", "\u001b[6A\u001b[2K\r1dc588c89da1: Downloading [==================================================>] 1.211kB/1.211kB\r\u001b[6B"]
|
||||
[16.574533, "o", "\u001b[8A\u001b[2K\rc4f3d97811f6: Downloading [=======> ] 3.146MB/20.54MB\r\u001b[8B"]
|
||||
[16.574952, "o", "\u001b[6A\u001b[2K\r1dc588c89da1: Download complete \r\u001b[6B"]
|
||||
[16.673185, "o", "\u001b[8A\u001b[2K\rc4f3d97811f6: Downloading [===================================> ] 14.68MB/20.54MB\r\u001b[8B"]
|
||||
[16.673215, "o", "\u001b[7A\u001b[2K\r4c8c172c6586: Download complete \r\u001b[7B"]
|
||||
[16.772966, "o", "\u001b[8A\u001b[2K\rc4f3d97811f6: Downloading [==================================================>] 20.54MB/20.54MB\r\u001b[8B"]
|
||||
[16.773287, "o", "\u001b[5A\u001b[2K\r04c3905a997c: Download complete \r\u001b[5B"]
|
||||
[16.873596, "o", "\u001b[4A\u001b[2K\r881fc932939e: Downloading [==================================================>] 3.854MB/3.854MB\r\u001b[4B\u001b[3A\u001b[2K\r77a3bfea78f5: Download complete \r\u001b[3B"]
|
||||
[16.874183, "o", "\u001b[8A\u001b[2K\rc4f3d97811f6: Download complete \r\u001b[8B"]
|
||||
[16.97324, "o", "\u001b[4A\u001b[2K\r881fc932939e: Download complete \r\u001b[4B"]
|
||||
[16.97344, "o", "\u001b[2A\u001b[2K\r7cb374baf968: Download complete \r\u001b[2B"]
|
||||
[16.975038, "o", "\u001b[1A\u001b[2K\r61d8f4c85a74: Download complete \r\u001b[1B"]
|
||||
[16.975102, "o", "\u001b[4A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[4B"]
|
||||
[17.077256, "o", "\u001b[4A\u001b[2K\r881fc932939e: Extracting 1 s\r\u001b[4B"]
|
||||
[17.17391, "o", "\r\n\u001b[1A\u001b[2K\r79979b969278: Download complete \r\u001b[1B\r\n\u001b[1A\u001b[2K\r33247e384332: Download complete \r\u001b[1B"]
|
||||
[17.174943, "o", "\u001b[5A\u001b[2K\r77a3bfea78f5: Extracting 1 s\r\u001b[5B"]
|
||||
[17.175715, "o", "\u001b[6A\u001b[2K\r881fc932939e: Pull complete \r\u001b[6B"]
|
||||
[17.273773, "o", "\u001b[5A\u001b[2K\r77a3bfea78f5: Extracting 1 s\r\u001b[5B"]
|
||||
[17.373839, "o", "\u001b[5A\u001b[2K\r77a3bfea78f5: Extracting 1 s\r\u001b[5B"]
|
||||
[17.473053, "o", "\u001b[7A\u001b[2K\r04c3905a997c: Pull complete \r\u001b[7B"]
|
||||
[17.473286, "o", "\u001b[5A\u001b[2K\r77a3bfea78f5: Pull complete \r\u001b[5B"]
|
||||
[17.573198, "o", "\u001b[9A\u001b[2K\r4c8c172c6586: "]
|
||||
[17.573314, "o", "Extracting 1 s\r\u001b[9B"]
|
||||
[17.576072, "o", "\u001b[4A\u001b[2K\r7cb374baf968: Pull complete \r\u001b[4B"]
|
||||
[17.673476, "o", "\u001b[9A\u001b[2K\r4c8c172c6586: Pull complete \r\u001b[9B"]
|
||||
[17.774558, "o", "\u001b[8A\u001b[2K\r1dc588c89da1: Pull complete \r\u001b[8B"]
|
||||
[17.775077, "o", "\u001b[3A\u001b[2K\r61d8f4c85a74: Pull complete \r\u001b[3B"]
|
||||
[17.872955, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[17.972908, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[18.073757, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[18.173261, "o", "\u001b[10A\u001b[2K\r"]
|
||||
[18.173287, "o", "c4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[18.275577, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[18.374885, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Extracting 1 s\r\u001b[10B"]
|
||||
[18.5277, "o", "\u001b[10A\u001b[2K\rc4f3d97811f6: Pull complete \r\u001b[10BDigest: sha256:fb4658584bd9a916ffb6f6e365f97c25cfdb2923801f551ea08356e695f14ff7\r\nStatus: Downloaded newer image for nginx:alpine\r\n"]
|
||||
[18.731387, "o", "ab8f9a702c7bffc0c25dee09bb104432756d3d5a6ee427d223346d4756dab06f\r\n"]
|
||||
[19.004927, "o", "\u001b]3008;end=e9896e4b-9153-4d0f-9036-87dcf1fc25b5;exit=success\u001b\\"]
|
||||
[19.005922, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[19.006125, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[19.006126, "o", ""]
|
||||
[21.041126, "o", "c"]
|
||||
[21.076126, "o", "l"]
|
||||
[21.111126, "o", "e"]
|
||||
[21.146126, "o", "a"]
|
||||
[21.181126, "o", "r"]
|
||||
[21.216126, "o", "\r\n"]
|
||||
[21.21896, "o", "\u001b]3008;start=da689da0-870f-4a43-9823-65b02972ad2f;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[21.219711, "o", "\u001b[H\u001b[2J\u001b[3J"]
|
||||
[21.219934, "o", "\u001b]3008;end=da689da0-870f-4a43-9823-65b02972ad2f;exit=success\u001b\\"]
|
||||
[21.220987, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[21.221082, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[21.221084, "o", ""]
|
||||
[21.256084, "o", "d"]
|
||||
[21.291084, "o", "o"]
|
||||
[21.326084, "o", "c"]
|
||||
[21.361084, "o", "k"]
|
||||
[21.396084, "o", "e"]
|
||||
[21.431084, "o", "r"]
|
||||
[21.466084, "o", " "]
|
||||
[21.501084, "o", "i"]
|
||||
[21.536084, "o", "m"]
|
||||
[21.571084, "o", "a"]
|
||||
[21.606084, "o", "g"]
|
||||
[21.641084, "o", "e"]
|
||||
[21.676084, "o", " "]
|
||||
[21.711084, "o", "l"]
|
||||
[21.746084, "o", "s"]
|
||||
[21.781084, "o", "\r\n"]
|
||||
[21.783106, "o", "\u001b]3008;start=b5588bea-23dc-4b85-b8b6-2cc3e5b5be09;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[21.84173, "o", " \u001b[1m\u001b[106m\u001b[30mi\u001b[0m\u001b[0m \u001b[96mInfo → \u001b[0m\u001b[0m \u001b[38;5;0m\u001b[48;5;14m U \u001b[0m In Use\r\n\u001b[39m\u001b[1mIMAGE\u001b[0m \u001b[39m\u001b[1mID\u001b[0m \u001b[39m\u001b[1mDISK USAGE\u001b[0m \u001b[39m\u001b[1mCONTENT SIZE\u001b[0m \u001b[39m\u001b[1mEXTRA\u001b[0m\r\n\u001b[34m\u001b[1mhello-world:latest\u001b[0m \u001b[39m1e4c05b897a7\u001b[0m \u001b[39m21.8kB\u001b[0m \u001b[39m9.49kB\u001b[0m "]
|
||||
[21.84178, "o", " \r\n\u001b[34m\u001b[1mnginx:alpine\u001b[0m \u001b[39mfb4658584bd9\u001b[0m \u001b[39m95.7MB\u001b[0m"]
|
||||
[21.841786, "o", " "]
|
||||
[21.841826, "o", " \u001b[39m27.2MB\u001b[0m \u001b[38;5;0m\u001b[48;5;14m U \u001b[0m \r\n"]
|
||||
[21.843327, "o", "\u001b]3008;end=b5588bea-23dc-4b85-b8b6-2cc3e5b5be09;exit=success\u001b\\"]
|
||||
[21.844612, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[21.844725, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[21.844726, "o", ""]
|
||||
[21.879726, "o", "d"]
|
||||
[21.914726, "o", "o"]
|
||||
[21.949726, "o", "c"]
|
||||
[21.984726, "o", "k"]
|
||||
[22.019726, "o", "e"]
|
||||
[22.054726, "o", "r"]
|
||||
[22.089726, "o", " "]
|
||||
[22.124726, "o", "p"]
|
||||
[22.159726, "o", "s"]
|
||||
[22.194726, "o", "\r\n"]
|
||||
[22.196199, "o", "\u001b]3008;start=d666be6e-1560-4e8b-97a3-3df5b8c6a43a;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[22.344064, "o", "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\nab8f9a702c7b nginx:alpine \"/docker-entrypoint.…\" 1 second ago Up Less than a second 0.0.0.0:8080->80/tcp, [::]:8080->80/tcp web"]
|
||||
[22.344275, "o", "\r\n"]
|
||||
[22.347778, "o", "\u001b]3008;end=d666be6e-1560-4e8b-97a3-3df5b8c6a43a;exit=success\u001b\\"]
|
||||
[22.349015, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[22.349017, "o", ""]
|
||||
[25.384017, "o", "d"]
|
||||
[25.419017, "o", "o"]
|
||||
[25.454017, "o", "c"]
|
||||
[25.489017, "o", "k"]
|
||||
[25.524017, "o", "e"]
|
||||
[25.559017, "o", "r"]
|
||||
[25.594017, "o", " "]
|
||||
[25.629017, "o", "t"]
|
||||
[25.664017, "o", "o"]
|
||||
[25.699017, "o", "p"]
|
||||
[25.734017, "o", " "]
|
||||
[25.769017, "o", "w"]
|
||||
[25.804017, "o", "e"]
|
||||
[25.839017, "o", "b"]
|
||||
[25.874017, "o", " "]
|
||||
[25.909017, "o", "-"]
|
||||
[25.944017, "o", "-"]
|
||||
[25.979017, "o", "f"]
|
||||
[26.014017, "o", "o"]
|
||||
[26.049017, "o", "r"]
|
||||
[26.084017, "o", "m"]
|
||||
[26.119017, "o", "a"]
|
||||
[26.154017, "o", "t"]
|
||||
[26.189017, "o", " "]
|
||||
[26.224017, "o", "p"]
|
||||
[26.259017, "o", "i"]
|
||||
[26.294017, "o", "d"]
|
||||
[26.329017, "o", ","]
|
||||
[26.364017, "o", "u"]
|
||||
[26.399017, "o", "s"]
|
||||
[26.434017, "o", "e"]
|
||||
[26.469017, "o", "r"]
|
||||
[26.504017, "o", ","]
|
||||
[26.539017, "o", "a"]
|
||||
[26.574017, "o", "r"]
|
||||
[26.609017, "o", "g"]
|
||||
[26.644017, "o", "s"]
|
||||
[26.679017, "o", "\r\n"]
|
||||
[26.683916, "o", "\u001b]3008;start=af83704b-8810-40b6-9fcd-82d7b305ce33;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[26.732146, "o", "PID "]
|
||||
[26.732493, "o", " USER COMMAND\r\n4972 root nginx: master process nginx -g daemon off;\r\n5069 uuidd nginx: worker process\r\n5070 uuidd nginx: worker process\r\n5071 uuidd nginx: worker process\r\n5072 uuidd nginx: worker process\r\n5073 uuidd nginx: worker process\r\n5074 uuidd nginx: worker process\r\n5075 uuidd nginx: worker process\r\n5076 uuidd nginx: worker process\r\n"]
|
||||
[26.737186, "o", "\u001b]3008;end=af83704b-8810-40b6-9fcd-82d7b305ce33;exit=success\u001b\\"]
|
||||
[26.742742, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[26.742874, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[26.742874, "o", ""]
|
||||
[26.777874, "o", "d"]
|
||||
[26.812874, "o", "o"]
|
||||
[26.847874, "o", "c"]
|
||||
[26.882874, "o", "k"]
|
||||
[26.917874, "o", "e"]
|
||||
[26.952874, "o", "r"]
|
||||
[26.987874, "o", " "]
|
||||
[27.022874, "o", "s"]
|
||||
[27.057874, "o", "t"]
|
||||
[27.092874, "o", "a"]
|
||||
[27.127874, "o", "t"]
|
||||
[27.162874, "o", "s"]
|
||||
[27.197874, "o", " "]
|
||||
[27.232874, "o", "-"]
|
||||
[27.267874, "o", "-"]
|
||||
[27.302874, "o", "n"]
|
||||
[27.337874, "o", "o"]
|
||||
[27.372874, "o", "-"]
|
||||
[27.407874, "o", "s"]
|
||||
[27.442874, "o", "t"]
|
||||
[27.477874, "o", "r"]
|
||||
[27.512874, "o", "e"]
|
||||
[27.547874, "o", "a"]
|
||||
[27.582874, "o", "m"]
|
||||
[27.617874, "o", "\r\n"]
|
||||
[27.620797, "o", "\u001b]3008;start=9c1b1896-28e7-4939-97fc-b22e7276d14c;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[28.684325, "o", "CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS\r\nab8f9a702c7b web 0.00% 7.492MiB / 30.26GiB 0.02% 486B / 84B 0B / 0B 9\r\n"]
|
||||
[28.685855, "o", "\u001b]3008;end=9c1b1896-28e7-4939-97fc-b22e7276d14c;exit=success\u001b\\"]
|
||||
[28.686694, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[28.686793, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[28.686794, "o", ""]
|
||||
[31.721794, "o", "c"]
|
||||
[31.756794, "o", "u"]
|
||||
[31.791794, "o", "r"]
|
||||
[31.826794, "o", "l"]
|
||||
[31.861794, "o", " "]
|
||||
[31.896794, "o", "-"]
|
||||
[31.931794, "o", "-"]
|
||||
[31.966794, "o", "s"]
|
||||
[32.001794, "o", "i"]
|
||||
[32.036794, "o", "l"]
|
||||
[32.071794, "o", "e"]
|
||||
[32.106794, "o", "n"]
|
||||
[32.141794, "o", "t"]
|
||||
[32.176794, "o", " "]
|
||||
[32.211794, "o", "l"]
|
||||
[32.246794, "o", "o"]
|
||||
[32.281794, "o", "c"]
|
||||
[32.316794, "o", "a"]
|
||||
[32.351794, "o", "l"]
|
||||
[32.386794, "o", "h"]
|
||||
[32.421794, "o", "o"]
|
||||
[32.456794, "o", "s"]
|
||||
[32.491794, "o", "t"]
|
||||
[32.526794, "o", ":"]
|
||||
[32.561794, "o", "8"]
|
||||
[32.596794, "o", "0"]
|
||||
[32.631794, "o", "8"]
|
||||
[32.666794, "o", "0"]
|
||||
[32.701794, "o", " "]
|
||||
[32.736794, "o", "|"]
|
||||
[32.771794, "o", " "]
|
||||
[32.806794, "o", "g"]
|
||||
[32.841794, "o", "r"]
|
||||
[32.876794, "o", "e"]
|
||||
[32.911794, "o", "p"]
|
||||
[32.946794, "o", " "]
|
||||
[32.981794, "o", "t"]
|
||||
[33.016794, "o", "i"]
|
||||
[33.051794, "o", "t"]
|
||||
[33.086794, "o", "l"]
|
||||
[33.121794, "o", "e"]
|
||||
[33.156794, "o", "\r\n"]
|
||||
[33.158312, "o", "\u001b]3008;start=a50685b3-5a5e-400b-a458-eb5e7c2a9c9c;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[33.16577, "o", "<\u001b[01;31m\u001b[Ktitle\u001b[m\u001b[K>Welcome to nginx!</\u001b[01;31m\u001b[Ktitle\u001b[m\u001b[K>\r\n"]
|
||||
[33.174303, "o", "\u001b]3008;end=a50685b3-5a5e-400b-a458-eb5e7c2a9c9c;exit=success\u001b\\"]
|
||||
[33.185051, "o", "\u001b]3008;start=67e73a71-aa8c-4553-9b2c-f6b84ded2924;type=shell;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\"]
|
||||
[33.185188, "o", "\u001b[1;32mroot@docker\u001b[0m:~# "]
|
||||
[33.185189, "o", ""]
|
||||
[33.220189, "o", "e"]
|
||||
[33.255189, "o", "x"]
|
||||
[33.290189, "o", "i"]
|
||||
[33.325189, "o", "t"]
|
||||
[33.360189, "o", "\r\n"]
|
||||
[33.36201, "o", "\u001b]3008;start=ed6629cc-3a7a-40c1-8634-070845bf7603;type=command;machineid=fee09faa07ad4b838265ae23070d7d35;user=root;hostname=docker;bootid=d0c47617-5ddf-4367-869c-1347fa57e1bf;pid=4879;cwd=/root\u001b\\logout\r\n"]
|
||||
[33.362538, "o", "\u001b]3008;end=f47dd143b8174c44aef0e85845074248\u001b\\"]
|
||||
[33.375937, "o", "\u001b[1;34mlxd\u001b[0m > "]
|
||||
[33.375937, "o", ""]
|
||||
[38.410937, "o", "\r\n"]
|
||||
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 389 KiB |
@@ -29,16 +29,16 @@ instructions:
|
||||
- !Marker Shell
|
||||
- !Command {command: "# Or open a shell in the instance and use Docker as on any machine"}
|
||||
- !Command {command: "lxc shell docker"}
|
||||
- !Command {command: "docker run -d --name web -p 8080:80 nginx:alpine"}
|
||||
- !Command {command: "docker run --detach --name web --publish 8080:80 nginx:alpine"}
|
||||
- !Wait 2s
|
||||
- !Command {command: "clear"}
|
||||
- !Command {command: "docker image ls"}
|
||||
- !Command {command: "docker ps"}
|
||||
- !Wait 3s
|
||||
- !Command {command: "docker top web -o pid,user,args"}
|
||||
- !Command {command: "docker top web --format pid,user,args"}
|
||||
- !Command {command: "docker stats --no-stream"}
|
||||
- !Wait 3s
|
||||
- !Command {command: "curl -s localhost:8080 | grep title"}
|
||||
- !Command {command: "curl --silent localhost:8080 | grep title"}
|
||||
- !Command {command: "exit"}
|
||||
- !Wait 5s
|
||||
- !Command {command: "demo_cleanup", hidden: true}
|
||||
@@ -0,0 +1,17 @@
|
||||
# shellcheck shell=bash
|
||||
# Helpers shared by the hidden preambles of the tutorial demos (demo/*/setup.sh).
|
||||
|
||||
# Root shell of an instance, made recordable: its prompt (root@<instance>) ends
|
||||
# with the marker autocast waits for, and its input is not echoed twice (no
|
||||
# readline, no tty echo). Only for instances created by the demo.
|
||||
demo_instance_shell() {
|
||||
lxc exec "$1" -- sh -c "cat >> /root/.bashrc" <<RC
|
||||
PS1='\[\e[1;32m\]root@$1\[\e[0m\]:\w# AUTOCAST_PROMPT'
|
||||
set +o emacs; stty -echo
|
||||
RC
|
||||
}
|
||||
|
||||
# Wait for the end of cloud-init in an instance (quietly)
|
||||
demo_wait_cloud_init() {
|
||||
lxc exec "$1" -- cloud-init status --wait >/dev/null
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
description = "Enregistre une démo (demo/<nom>.cast avec autocast, retouché par demo/castfix.py, puis demo/<nom>.gif avec agg)"
|
||||
usage = '''
|
||||
arg "<name>" help="Scénario (demo/<name>.yaml)" {
|
||||
choices "tour" "install" "lxc" "docker/install" "docker/usage"
|
||||
choices "tour" "install" "lxc" "docker/install" "docker/usage" "backrest/install" "backrest/restore"
|
||||
}
|
||||
'''
|
||||
run = '''
|
||||
|
||||
@@ -20,6 +20,41 @@ config:
|
||||
# shell: /bin/bash
|
||||
# sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
write_files:
|
||||
- path: /usr/local/bin/gitea-db-dump.sh
|
||||
permissions: '0755'
|
||||
content: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
DIRECTORY=/var/snap/gitea/common/dump
|
||||
mkdir -p "${DIRECTORY}"
|
||||
FILE="${DIRECTORY}/gitea-db-$(date +%Y%m%d-%H%M).tar"
|
||||
/snap/bin/gitea dump --skip-repository --skip-lfs-data --skip-attachment-data --skip-package-data --skip-log --skip-custom-dir --skip-index --type tar --file "${FILE}.tmp"
|
||||
mv "${FILE}.tmp" "${FILE}"
|
||||
ls -1t "${DIRECTORY}"/gitea-db-*.tar | tail -n +25 | xargs -r rm -f --
|
||||
- path: /etc/systemd/system/gitea-db-dump.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Dump de la base Gitea
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/gitea-db-dump.sh
|
||||
- path: /etc/systemd/system/gitea-db-dump.timer
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Dump horaire de la base Gitea
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*:50
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
||||
runcmd:
|
||||
# Install gitea
|
||||
- [ snap, install, gitea ]
|
||||
# Enable the DB dump timer once gitea is installed
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable --now gitea-db-dump.timer
|
||||
@@ -21,6 +21,46 @@ config:
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
write_files:
|
||||
# The dump goes through a pipe: the snap's AppArmor profile prevents
|
||||
# nextcloud.mysqldump from writing to a redirected file (empty dump).
|
||||
# Plain SQL, not gzipped, so that restic deduplicates between dumps
|
||||
# (a gzipped dump is uploaded in full each time).
|
||||
# Every 4 hours, the last 24 hours are kept here.
|
||||
- path: /usr/local/bin/nextcloud-db-dump.sh
|
||||
permissions: '0755'
|
||||
content: |
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
DIRECTORY=/var/snap/nextcloud/common/dump
|
||||
mkdir -p "${DIRECTORY}"
|
||||
FILE="${DIRECTORY}/nextcloud-db-$(date +%Y%m%d-%H%M).sql"
|
||||
/snap/bin/nextcloud.mysqldump --single-transaction --skip-lock-tables | cat > "${FILE}.tmp"
|
||||
mv "${FILE}.tmp" "${FILE}"
|
||||
ls -1t "${DIRECTORY}"/nextcloud-db-*.sql | tail -n +7 | xargs -r rm -f --
|
||||
- path: /etc/systemd/system/nextcloud-db-dump.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Dump de la base Nextcloud
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/nextcloud-db-dump.sh
|
||||
- path: /etc/systemd/system/nextcloud-db-dump.timer
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Dump de la base Nextcloud toutes les 4 heures
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 00/4:30
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
||||
runcmd:
|
||||
# Install Nextcloud
|
||||
- [ snap, install, nextcloud ]
|
||||
# Enable the DB dump timer once Nextcloud is installed
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable --now nextcloud-db-dump.timer
|
||||
@@ -1,8 +1,10 @@
|
||||
name: docker-volume-data
|
||||
description: "A profile that add a volume for docker data"
|
||||
# Le volume doit exister avant l'installation du profil (LXD le vérifie) :
|
||||
# lxc storage volume create default docker-data
|
||||
devices:
|
||||
docker-data:
|
||||
type: disk
|
||||
pool: btrfs
|
||||
pool: default
|
||||
source: docker-data
|
||||
path: /var/lib/docker
|
||||