<p>I have linked a Persistent Volume to my Kubernetes Neo4j Replication Controller to store the DB data. Now I would like to download that data locally to run the production DB on my system. I can't find the way to download the Disk content. Can someone point me in the right direction?</p>

<p>Updates (Persistent Volume Creation with Kubernetes):</p>

<pre><code>persistent-volume-db.json
{
  "kind": "PersistentVolume",
  "apiVersion": "v1",
  "metadata": {
    "name": "pv-db"
  },
  "spec": {
    "capacity": {
      "storage": "500Gi"
    },
    "accessModes": [
      "ReadWriteMany"
    ],
    "gcePersistentDisk": {
      "pdName": "tuwa-db-data-disk",
      "fsType": "ext4"
    }
  }
}

persistent-volume-claim-db.json
{
  "kind": "PersistentVolumeClaim",
  "apiVersion": "v1",
  "metadata": {
    "name": "pvc"
  },
  "spec": {
    "accessModes": [
      "ReadWriteMany"
    ],
    "resources": {
      "requests": {
        "storage": "500Gi"
      }
    }
  }
}
</code></pre>

<p>And then the usage:  </p>

<pre><code>neo4j-controller.json
{
  "kind": "ReplicationController",
  "apiVersion": "v1",
  "metadata": {
    "name": "neo4j-controller",
    "labels": {
      "name": "neo4j"
    }
  },
  "spec": {
    "replicas": 1,
    "template": {
      "metadata": {
        "labels": {
          "name": "neo4j"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "neo4j",
            "image": "neo4j/neo4j",
            "ports": [
              {
                "name": "neo4j-server",
                "containerPort": 7474
              }
            ],
            "volumeMounts": [
              {
                "mountPath": "/data/databases",
                "name": "pv-db"
              }
            ]
          }
        ],
        "volumes": [
          {
            "name": "pv-db",
            "persistentVolumeClaim": {
              "claimName": "pvc-db"
            }
          }
        ]
      }
    }
  }
}
</code></pre>

<p>GCE's admin panel doesn't have a "download" button for persistent disks, but <code>gcloud</code> makes it easy to copy files from an instance to your local machine:</p>

<p><code>gcloud compute copy-files example-instance:~/REMOTE-DIR ~/LOCAL-DIR --zone us-central1-a</code></p>

<p>This will copy <code>~/REMOTE-DIR</code> from a remote instance into <code>~/LOCAL-DIR</code> on your machine. Just replace the directory names, <code>example-instance</code> with your instances name, and adjust your zone if necessary. More info here in the <a href="https://cloud.google.com/sdk/gcloud/reference/compute/copy-files" rel="noreferrer">docs</a>.</p>
