From 284873878931553f7535164a802b0abbd8bdc320 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sun, 8 Dec 2019 15:10:06 +0100 Subject: [PATCH] Update README.md --- README.md | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d818cab..1456ba6 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ docker pull zettaio/restic-compose-backup ## Configuration (env vars) -Minimum configuration (env vars) +Minimum configuration ```bash RESTIC_REPOSITORY @@ -39,7 +39,11 @@ More config options can be found in the [documentation]. Restic backend specific env vars : https://restic.readthedocs.io/en/stable/040_backup.html#environment-variables -### Compose Example +## Compose Example + +We simply control what should be backed up by adding +labels to our containers. More details are covered +in the [documentation]. restic-backup.env @@ -70,7 +74,7 @@ services: - /var/run/docker.sock:/tmp/docker.sock:ro # Persistent storage of restic cache (greatly speeds up all restic operations) - cache:/cache - example: + web: image: some_image labels: # Enables backup of the volumes below @@ -115,6 +119,36 @@ volumes: cache: ``` +## The `rcb` command + +Everything is controlled using the `rcb` command. +After configuring backup with labels and restarted +the affected services we can quickly view the +result using the `status` subcommand. + +```bash +$ docker-compose run --rm backup rcb status +INFO: Status for compose project 'myproject' +INFO: Repository: '' +INFO: Backup currently running?: False +INFO: --------------- Detected Config --------------- +INFO: service: mysql +INFO: - mysql (is_ready=True) +INFO: service: mariadb +INFO: - mariadb (is_ready=True) +INFO: service: postgres +INFO: - postgres (is_ready=True) +INFO: service: web +INFO: - volume: media +INFO: - volume: /srv/files +``` + +The `status` subcommand lists what will be backed up and +even pings the database services checking their availability. +The `restic` command can also be used directly in the container. + +More `rcb` commands can be found in the [documentation]. + ## Running Tests ```bash