# Migrating 13K organization units (Levels 1-7) from Test to UAT

**URL:** <https://forum.communityhealthtoolkit.org/t/migrating-13k-organization-units-levels-1-7-from-test-to-uat/4810>\
**Category:** Technical Support\
**Created:** [March 27, 2025, 12:49pm UTC](https://forum.communityhealthtoolkit.org/t/migrating-13k-organization-units-levels-1-7-from-test-to-uat/4810 "2025-03-27T12:49:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [March 27, 2025, 5:55pm UTC](https://forum.communityhealthtoolkit.org/t/migrating-13k-organization-units-levels-1-7-from-test-to-uat/4810/2 "2025-03-27T17:55:55Z")

</div>

A couple followup questions:

- Is there already existing data on the UAT instance or is it empty?
- Do you want to also copy the _reports_ associated with the migrated contacts from the test instance to UAT?
- Do you want to also migrate the _users_ (including credentials, etc) from the test instance to UAT?
- Are you migrating all of the contacts from the test instance to the UAT instance or just a sub-set of the contacts on the test instance?

Depending on your precise needs here, a number of options come to mind.

To just dump all of the data from the `medic` database and copy it to a new instance, you might be able to just use the `couchbackup` utility [discussed recently](https://forum.communityhealthtoolkit.org/t/couchdb-backup-script-with-couchbackup/4687). It is also possible to just set up direct replication [between two Couch databases](https://docs.couchdb.org/en/latest/replication/index.html#replication). This can be configured as a one-time job to copy all the data from one db to another.

Copying just the contact docs (and not any reports, etc) is going to be more tricky. However, filtered replication should be possible with a bit more configuration.

Migrating users/credentials is probably going to be the most difficult (if that is something that you need to do). I have never tried it before, but I doubt you can simply copy/replicate docs from one `_users` db to another. I think the user’s password `salt` is tied to the `secret` value that is specific to a given Couch instance.

---

_[View the full topic](https://forum.communityhealthtoolkit.org/t/migrating-13k-organization-units-levels-1-7-from-test-to-uat/4810)._
