HUB
Sign inSign up

informaticsmatters/volume-replicator

By informaticsmatters

•Updated 3 months ago

A simple image to replicate (rsync) two volumes

Image
0

7.6K

informaticsmatters/volume-replicator repository overview

⁠docker-volume-replicator

CodeFactor

A simple container image that expects two volume mounts "/volume-a" and "/volume-b" where data is replicated (using rsync) from one to the other based on an environment variable whose value is either AtoB or BtoA.

When running the image...

  1. Mount volumes onto the paths /volume-a and /volume-b
  2. Set environment variable REPLICATE_DIRECTION
  3. Set environment variable REPLICATE_DELETE to anything other than yes to avoid wiping the destination

⁠Building the image

Just run docker..

$ docker build . -t informaticsmatters/volume-replicator:latest

And run typically with something like: -

$ docker run --rm -e REPLICATE_DIRECTION=AtoB \
        -v $PWD/a:/volume-a \
        -v $PWD/b:/volume-b \ 
        informaticsmatters/volume-replicator:latest

Tag summary
Recent tags
Content type
Image
Digest
sha256:ba9873dcd…
Size
100 MB
Last updated
3 months ago
docker pull informaticsmatters/volume-replicator:latest