Docker Community Forums

Share and learn in the Docker community.

Drawbacks of Docker Volumes


(Kouroshdocid) #1

Hello every one,

We am trying to find a prefered mechanism for persisting data for our Docker container.
The Docker application retrivies files from a FTP server and after processing them it needs to save them somewhere for 12 months.

We are thinking of to use a Docker volume and create it on our file server inside our network (not on the host that hosting the Docker conatiner).

What is disadvantages of this solution? What happend if the Docker container is deleted by mistake?

thanks


(Deniszhdanov) #2

Hello,

This page provides extensive information.

You might find this useful:

Volumes are easier to back up or migrate than bind mounts.
You can manage volumes using Docker CLI commands or the Docker API.
...
Create and manage volumes
Unlike a bind mount, you can create and manage volumes outside the scope of any container.
...
Backup, restore, or migrate data volumes
Volumes are useful for backups, restores, and migrations

(Kouroshdocid) #3

Thanks,
But when you delete the container or when you update the Container Image, the volume will be flushed and you lose your data.


(Deniszhdanov) #4

Remove volumes:

A Docker data volume persists after a container is deleted