342 shaares
45 liens privés
45 liens privés
docker run --rm -v some_volume:/volume -v /tmp:/backup alpine tar -cjf /backup/some_archive.tar.bz2 -C /volume ./
And to restore it, just run:
docker run --rm -v some_volume:/volume -v /tmp:/backup alpine sh -c "rm -rf /volume/ /volume/..? /volume/.[!.]* ; tar -C /volume/ -xjf /backup/some_archive.tar.bz2"