Find the cloud controller db connection string
bosh ssh api_z1
grep postgres `find /var/vcap/data/jobs/cloud_controller_ng/ cloud_controller_ng.yml`
exit # leave the container
The last entry is the connection string for postgres.
Usually iy is: postgres://ccadmin:[email protected]:5524/ccdb
Get all apps and read through:
$ psql -h 10.244.0.30 -p 5524 -U ccadmin ccdb -c 'select droplet_hash, name from apps;'
or filter
$ psql -h 10.244.0.30 -p 5524 -U ccadmin ccdb -c "select droplet_hash, name from apps where name='return-of-the-jedi';"
sample output:
droplet_hash | name
------------------------------------------+--------------------
9a39178adb8b15c72ed2fb8da39091472b3809b7 | return-of-the-jedi
(1 row)
$ bosh ssh api_z1
$ DROPLET=`find /var/vcap/store/10.244.0.34.xip.io-cc-droplets -name <app hash here>`
find some way of sending the contents of $DROPLET to your host :D