Backup-friendly Docker volumes -


i want take holistic approach backing multiple machines running multiple docker containers. might run, example, postgres databases. want system, without having have specific backup commands different types of volumes.

it fine have custom external script sends e.g. signals containers or runs docker commands, want avoid specific image or type of image. in example of postgres, documentation suggests running postgres-specific commands backup databases, goes against design goals backup solution trying create.

it ok if have impose restrictions on docker images, long reasonably easy implement starting existing docker images , extending.

any thoughts on how solve this?

i want stress not looking solution how postgres databases under docker, there many answers explaining how so. looking way any volume, without having know or having run specific commands data.

(i considered whether question belonged on or serverfault, believe problem solved developers, hence belongs here. happy move if consensus otherwise)

edit: clarify, want similar explained in question how deal persistent storage (e.g. databases) in docker using approach in accepted answer not going work postgres (and sure other database containers) according documentation.

i'm skeptical there custom solution, holistic, multi machine, multi container, application/container agnostic approach. point of view there lot of orchestration activities necessary in first place. , wonder if wouldn't use kubernetes anyways - supposedly - comes own backup solution.

for single machine, multi container setup suggest store container's data, configuration, , eventual build scripts within 1 directory tree (e.g. /docker/) , use standard file based backup program backup root directory.

  • use docker-compose managed containers. lets store configuration , build options in file(s). have individual compose file each service, single 1 work.
  • have subdirectory each service. mount bind-mount directories aka volumes of container there. if need adapt build process more thoroughly can store scripts, sources, dockerfiles, etc. in there well.
  • since containers supposed ephemeral, persistent data should in bind-mount , therefore in main docker directory.

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -