Re:Tell HN: Docker just ate 19GB of production data
by sz4kerto on Monday July 22, 2019 @02:16PM
(#20500670)
I really-really hope you are not relying on Docker only when protecting 19G of data. Docker volume operations are the equivalent of playing with sudo rm -rf, shit's going to happen once in a while.
[ Parent
| on HN ]
Re:Tell HN: Docker just ate 19GB of production data
by scarface74 on Monday July 22, 2019 @02:43PM
(#20500958)
I am a Docker newbie but I thought it wasn’t considered best practice to use Docker for anything where you care about the data in the container. I’ve only used for API’s batch jobs, etc.
Re:Tell HN: Docker just ate 19GB of production data
by markbnj on Monday July 22, 2019 @03:38PM
(#20501525)
You're correct that container root file systems should be considered ephemeral, and writing anything that needs to be persisted to them is a smell. However you can mount persistent volumes to a container specifically for the purpose of deploying stateful applications and referencing persistent data. How safe you can consider that data to be depends on the underlying tech that is provisioning the storage. For example a GCE persistent disk with the retain flag set is probably pretty damn durable. I would still back it up, however.
Re:Tell HN: Docker just ate 19GB of production data
by scarface74 on Monday July 22, 2019 @07:34PM
(#20503268)
What advantage does Docker really give you for long live mostly stable resources like databases?
For batch processing, my usual pattern has always been to move the data from (slower) network storage to local storage, process, move results back to network storage.
Re:Tell HN: Docker just ate 19GB of production data
by markbnj on Monday July 22, 2019 @10:32PM
(#20503988)
Well whichever advantages of containers are important to you I don't think you lose them just because the process reads and writes persistent data. It seems like you're really questioning whether it's as compelling a use case, which is a bigger topic and depends on a lot of specifics.
Re:Tell HN: Docker just ate 19GB of production data
by cheez on Monday July 22, 2019 @02:46PM
(#20501003)
Docker volumes are persistent, unless they're not :-)
Re:Tell HN: Docker just ate 19GB of production data
by q_queue on Monday July 22, 2019 @05:29PM
(#20502494)
I've never been willing to consider docker volumes persistent. In the big picture, a requirement of "posix filesystem semantics" and "persistent" is a pretty inconvenient and/or expensive requirement.
Re:Tell HN: Docker just ate 19GB of production data
by cheez on Monday July 22, 2019 @11:44PM
(#20504249)
I am super paranoid about docker volumes. But I have application-level backup which is tested daily.
Re:Tell HN: Docker just ate 19GB of production data
by scarface74 on Monday July 22, 2019 @02:59PM
(#20501165)
Well, I guess it also doesn’t help that I’ve only used Docker with AWS Fargate (aka “Serverless Docker”) - where nothing is persistent.
[dead]
Re:Tell HN: Docker just ate 19GB of production data
by scarface74 on Monday July 22, 2019 @03:55PM
(#20501699)
Well, I wasn’t completely crazy. There was just a subtlety I missed.
Re:Tell HN: Docker just ate 19GB of production data
by sz4kerto on Wednesday July 31, 2019 @01:58AM
(#20572007)
This is an ill-informed blogpost. Don't believe everything on the internet, really.
Re:Tell HN: Docker just ate 19GB of production data
by kissgyorgy on Monday July 22, 2019 @05:08PM
(#20502347)
I misread your comment, double LOL. I read "I thought it WAS considered best practice". Which is obviously not True.
Re:Tell HN: Docker just ate 19GB of production data
by slenk on Monday July 22, 2019 @09:28PM
(#20503746)
Not everyone's startup can necessarily afford purchasing lots of machines for each independent service, and they use docker to get around that cost barrier.
Re:Tell HN: Docker just ate 19GB of production data
by scarface74 on Monday July 22, 2019 @09:48PM
(#20503814)
But persistent data is so important that if your startup is so underfunded that you can’t setup a proper reliable data base, isn’t that a bigger issue? Why add the complication of Docker for production databases and why take the risk?