Skip to content

Commit b8ec952

Browse files
committed
Highlight notes
1 parent 4d7158e commit b8ec952

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ An utility to backup and restore [Docker volumes](https://docs.docker.com/storag
44

55
It works just as well with [Podman](https://podman.io/) volumes, just prefix each command with `podman` instead of `docker`.
66

7-
**Note**: Make sure no container is using the volume before backup or restore, otherwise your data might be damaged. See [Miscellaneous](#miscellaneous) for instructions.
7+
> [!WARNING]
8+
> Make sure no container is using the volume before backup or restore, otherwise your data might be damaged. See [Miscellaneous](#miscellaneous) for instructions.
89
9-
**Note**: When using docker-compose, make sure to backup and restore volume labels. See [Miscellaneous](#miscellaneous) for more information.
10+
> [!TIP]
11+
> When using docker-compose, make sure to backup and restore volume labels. See [Miscellaneous](#miscellaneous) for more information.
1012
1113
## Backup
1214

@@ -20,9 +22,11 @@ For example:
2022

2123
will archive volume named `some_volume` to `some_archive.tar.bz2` archive file.
2224

23-
**Note**: `--log-driver none` option is necessary to avoid storing an entire backup in a temporary stdout JSON file. More info in [Docker logging documentation](https://docs.docker.com/config/containers/logging/configure/) and in [this issue](https://github.com/loomchild/volume-backup/issues/39).
25+
> [!NOTE]
26+
> The `--log-driver none` option is necessary to avoid storing an entire backup in a temporary stdout JSON file. More info in [Docker logging documentation](https://docs.docker.com/config/containers/logging/configure/) and in [this issue](https://github.com/loomchild/volume-backup/issues/39).
2427
25-
**WARNING**: This method should not be used under PowerShell on Windows as no usable backup will be generated.
28+
> [!NOTE]
29+
> This method should not be used under PowerShell on Windows as no usable backup will be generated.
2630
2731
### Backup to a file (deprecated)
2832

@@ -48,8 +52,11 @@ For example:
4852

4953
will clean and restore volume named `some_volume` from `some_archive.tar.bz2` archive file.
5054

51-
**Note**: Don't forget the `-i` switch for interactive operation.
52-
**Note** Restore will fail if the target volume is not empty (use `-f` flag to override).
55+
> [!NOTE]
56+
> Don't forget the `-i` switch for interactive operation.
57+
58+
> [!NOTE]
59+
> Restore will fail if the target volume is not empty (use `-f` flag to override).
5360
5461
### Restore from a file (deprecated)
5562

@@ -74,7 +81,7 @@ will clean and restore volume named `some_volume` from `/tmp/some_archive.tar.bz
7481
```
7582
docker pull ghcr.io/loomchild/volume-backup
7683
```
77-
**Note**: you'll need to write `ghcr.io/loomchild/volume-backup` instead of just `loomchild/volume-backup` when running the utility.
84+
Then write `ghcr.io/loomchild/volume-backup` instead of just `loomchild/volume-backup` when running the utility.
7885
7986
1. Find all containers using a volume (to stop them before backing-up)
8087
```
@@ -105,6 +112,7 @@ will clean and restore volume named `some_volume` from `/tmp/some_archive.tar.bz
105112
```
106113
docker run -v [volume-name]:/volume --rm --log-driver none loomchild/volume-backup backup | ssh [receiver] docker run -i -v [volume-name]:/volume --rm loomchild/volume-backup restore
107114
```
108-
**Note**: In case there are no traffic limitations between the hosts you can trade CPU time for bandwidth by turning off compression via `-c none` option.
115+
> [!TIP]
116+
> In case there are no traffic limitations between the hosts you can trade CPU time for bandwidth by turning off compression via `-c none` option.
109117
110118
1. Volume labels are not backed-up or restored automatically, but they might be required for your application to work (e.g. when using `docker-compose`). If you need to preserve them, create a label backup file as follows: `docker inspect [volume-name] -f "{{json .Labels}}" > labels.json`. When restoring your data, target volume needs to be created manually with labels before launching the restore script: `docker volume create --label "label1" --label "label2" [volume-name]`.

0 commit comments

Comments
 (0)