Skip to content

Commit

Permalink
Update backup and restore command docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thejustinwalsh committed Jul 26, 2024
1 parent 10a1cad commit bda8a96
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<timestamp>.tar -C /data
```

Where `<timestamp>` is the timestamp of the backup you want to restore.

This assumes that the container name is `rugs` on your Docker container.

## License
Expand Down

0 comments on commit bda8a96

Please sign in to comment.