Open petrus-v opened 6 years ago
while restoring a volume (which happens when moving volume from nodes in mlfmonde/cluster) volumes labels are lost.
To reproduce:
$ docker volume create -d anybox/buttervolume:latest --label test=True test gle@rbx-6-any-3 ~ $ docker volume ls DRIVER VOLUME NAME anybox/buttervolume:latest test $ docker volume inspect test [ { "CreatedAt": "0001-01-01T00:00:00Z", "Driver": "anybox/buttervolume:latest", "Labels": { "test": "True" }, "Mountpoint": "/var/lib/buttervolume/volumes/test", "Name": "test", "Options": {}, "Scope": "local" } ] $ buttervolume snapshot test $ docker volume rm test $ docker volume inspect test [] Error: No such volume: test buttervolume restore test $ docker volume inspect test [ { "CreatedAt": "0001-01-01T00:00:00Z", "Driver": "anybox/buttervolume:latest", "Labels": null, "Mountpoint": "/var/lib/buttervolume/volumes/test", "Name": "test", "Options": null, "Scope": "local" } ]
One possible way to avoid losing labels is by storing them in a file such as /etc/buttervolume/labels.ini
while restoring a volume (which happens when moving volume from nodes in mlfmonde/cluster) volumes labels are lost.
To reproduce: