When performing local QA, it is expected that you test as much as possible with live data. This document covers synchronising your local data with the live instance. You'll want to remove any existing data to avoid conflicts that would result from changes made in local testing.
- Connect your browser to the CouchDB configuration endpoint at
http://localhost:5984/_utils - Delete the existing
uldatabase. - If you are testing changes to the image API or user logins, Delete the
imagesandusersdatabases as well. NOTE: Only removeusers(no leading underscore). Do not remove the built-in_usersdatabase. - Open a tunnel to the live instance using a command like:
SSH -L ul-vm 15984:localhost:5984 - Using the same local CouchDB configuration endpoint, set up two jobs to replicate the live data as follows:
- Navigate to the "Replication" page in Fauxton
- Click "New Replication".
- Under "Source"
- Set the "Type" to "Remote Database"
- On OS X, the database URL is something like
https://docker.for.mac.localhost:15984/ul. For other platforms see this issue. - Set the "Authentication" to "Username and password" and enter each.
- Under "Target"
- Set the "Type" to "New Local Database"
- Enter the database name, i.e.
ul - Set the "Authentication" to "Username and password" and enter each.
- Click "Start Replication"
- Monitor the replication page until you confirm that the replication is complete.
- If you are also testing changes to images or login functionality, repeat steps 2-6 for
imagesandusers.
- Close the tunnel to the live instance.