I created an EBS volume, connected and installed it in my container instance. In task definition volumes, I set the source path of the source with the directory installed. Container data is not created in the mounted directory; all other directories from the installed EBS work correctly.
The goal is to save data from the container and with this other volume backup.
Is there any way to use this attached volume with my container? or this is the best way to work with volumes and backups.
EDIT : It was tested using a random docker image in which it indicated the volume, and I ran into the same problem. I manage to get it to restart the Docker service, but I'm still looking for a solution without restarting the Docker.
Checking the volume catalog container that is installed by EBS
"HostConfig": { "Binds": [ "/mnt/data:/data" ], ... "Mounts": [ { "Source": "/mnt/data", "Destination": "/data", "Mode": "", "RW": true, "Propagation": "rprivate" } ],
displayed directory:
$ ls /mnt/data/ lost+found
Checking a container with a volume that is not installed by EBS
"HostConfig": { "Binds": [ "/home/ec2-user/data:/data" ], ... "Mounts": [ { "Source": "/home/ec2-user/data", "Destination": "/data", "Mode": "", "RW": true, "Propagation": "rprivate" } ]
displayed directory:
$ ls /home/ec2-user/data databases dbms