I want to take a snapshot of one database running in an application www
and put it in the application staging
. When I do this using cloning or creating / importing, none of the data is available.
How am I supposed to do this?
matt@server:~$ dokku run www curl http://www:password@dokku-couchdb-www:5555/www
{"db_name":"www","doc_count":4966,"doc_del_count":232,"update_seq":46475,"purge_seq":0,"compact_running":false,"disk_size":3071180923,"data_size":334987077,"instance_start_time":"1500006610823893","disk_format_version":6,"committed_update_seq":46475}
So from this you see 4966 documents.
matt@server:~$ dokku couchdb:clone www staging_www
-----> Starting container
Waiting for container to be ready
=====> CouchDB container created: staging_www
DSN: http://staging_www:password@dokku-couchdb-staging-www:5555/staging_www
-----> Copying data from www to staging_www
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1110M 0 1110M 0 0 30.4M 0 --:--:-- 0:00:36 --:--:-- 31.9M
-----> Done
Thus, there are no errors in the clone. Then i ran
dokku couchdb:link staging_www staging
dokku couchdb:promote staging_www staging
And there are no errors, but if I check the DB:
matt@server:~$ dokku run staging curl http://staging_www:password@dokku-couchdb-staging-www:5555/staging_www
{"db_name":"staging_www","doc_count":1,"doc_del_count":0,"update_seq":1,"purge_seq":0,"compact_running":false,"disk_size":4188,"data_size":342,"instance_start_time":"1509536857606369","disk_format_version":6,"committed_update_seq":1}
The document counter is 1, and I can’t access any data in the application staging
.
I tried equally
dokku couchdb:export www > www.couch
dokku couchdb:create staging_www
dokku couchdb:import staging_www < www.couch
dokku couchdb:link staging_www staging
dokku couchdb:promote staging_www staging
There are no errors, but again I get 1 document in the database.
What should I do?