Skip to content

Commit

Permalink
Merge pull request #14 from thejustinwalsh/docs-backup
Browse files Browse the repository at this point in the history
Update backup and restore command docs
  • Loading branch information
jorgenpt authored Jul 28, 2024
2 parents 10a1cad + bda8a96 commit c68e49e
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 c68e49e

Please sign in to comment.