title: InfluxDB in Docker not able to move data volume
body: <p>i have InfluxDB running in docker and mounted a persistent volume for /var/lib/influxdb.</p>
  
  <p>Every thing was fine and data has been stored.</p>
  
  <p>Then I changed the path for my external volume.</p>
  
  <p>So I stopped the container, created the new path, moved the content of the old volume to the new path, changed docker-compose url and restarted the container.</p>
  
  <p>But all my data was gone, InfluxDB looked quite new.</p>
  
  <p>After some trials I restored the original situation but still my data is lost.</p>
  
  <p>Is there any trick with InfluxDB? Because normally this should work with out any problem.</p>
  
  <p>Update: </p>
  
  <p>docker-compose before:</p>
  
  <pre><code>  influxdb:
  image: influxdb
  container_name: influxdb
  logging:
    options:
      max-size: "10m"
      max-file: "5"
  ports:
    - 8086:8086
  environment:
    - INFLUXDB_USER=XXX
    - INFLUXDB_USER_PASSWORD=XXX
  volumes:
    - /home/XXX/docker-data/influxdb:/var/lib/influxdb:z
    - /home/XXX/docker-data/influxdb/.influx_history:/.influx_history
  restart: always
  </code></pre>
  
  <p>after:</p>
  
  <pre><code>  influxdb:
  image: influxdb
  container_name: influxdb
  logging:
    options:
      max-size: "10m"
      max-file: "5"
  ports:
    - 8086:8086
  environment:
    - INFLUXDB_USER=XXX
    - INFLUXDB_USER_PASSWORD=XXX
  volumes:
    - /home/XXX/docker-data/influxdb/data:/var/lib/influxdb:z
    - /home/XX/docker-data/influxdb/config:/etc/influxdb:z
    - /home/XX/docker-data/influxdb/.influx_history:/.influx_history
  restart: always
  </code></pre>