From bda8a96fc897d2eb9ae019b579ebc663a0aa1d37 Mon Sep 17 00:00:00 2001 From: Justin Walsh Date: Thu, 25 Jul 2024 22:16:42 -0400 Subject: [PATCH] Update backup and restore command docs --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac32c71..5e8b81d 100644 --- a/README.md +++ b/README.md @@ -173,13 +173,24 @@ to create a `backup.tar` in the current directory: ```sh docker run --rm \ - --user $(id -u):$(id -g) \ --volumes-from rugs \ --mount "type=bind,src=$(pwd),dst=/backup" \ debian:stable-slim \ - tar cvf /backup/backup.tar /data + tar cvf "/backup/rugs-backup.$(date +"%Y%m%d.%H%M%S").tar" /data ``` +From within that same directory, you can restore the data with the following command: + +```sh +docker run --rm \ + --volumes-from rugs \ + --mount "type=bind,src=$(pwd),dst=/backup" \ + debian:stable-slim \ + tar -xvf /backup/rugs-backup..tar -C /data +``` + +Where `` is the timestamp of the backup you want to restore. + This assumes that the container name is `rugs` on your Docker container. ## License