# Migration Data API

**URL:** <https://forum.getodk.org/t/migration-data-api/53548>\
**Category:** Support\
**Tags:** odk-central\
**Created:** [February 11, 2025, 12:20pm UTC](https://forum.getodk.org/t/migration-data-api/53548 "2025-02-11T12:20:29Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![sowe1](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sowe1/32/13877_2.png) [@sowe1](https://forum.getodk.org/u/sowe1)\
**Post date:** [March 16, 2025, 8:47pm UTC](https://forum.getodk.org/t/migration-data-api/53548/31 "2025-03-16T20:47:50Z")

</div>

> [@yanokwa](#):
>
> > [@sowe1](#):
> >
> > I tried multiple ways to take a backup via the API, but it was impossible. As an alternative, I created a new machine and set up an SSH tunnel to access the Docker container's IP and PostgreSQL port. With this, I was at least able to obtain a database backup.
> 
> Can you confirm the SSH tunnel backup was done with native pg\_dump or was it something else?

Both API and CLI

> [@yanokwa](#):
>
> > [@sowe1](#):
> >
> > Since that wasn’t possible, I set up a machine with the same ODK version as the production environment (1.3.3) and restored the database. It wasn't easy, but I managed to do it, although I noticed some minor bugs.
> 
> Was the restore with the native pg\_restore or with the Central API or CLI?

CLI

> [@yanokwa](#):
>
> Was the restore to the bundled PostgreSQL database that came with v1.3.3 or an external DB? What version was that external DB?

No, because I can't change the docker-compose and configure it like this post... and Alwea gave an error... and the final use of a containerized database.

> [@yanokwa](#):
>
> When you restored to v1.3.3 it sounds like everything worked, correct? What minor bugs did you notice?

Basically, connections to an external database as mentioned in this [post](https://forum.getodk.org/t/connectionerror-getaddrinfo-enotfound-postgres/35742/4). It always says it can't connect.

> [@yanokwa](#):
>
> And it also sounds like you've been able to upgrade to v1.4, v1.5, v2022.3, and v2023.1, correct? It's only when you get to v2023.2 that upgrades fail?

Honestly, I’ve lost count of how many times I’ve tried to do the upgrade… But what I do know for sure is that when I go through the database update process, even setting the volume and following the steps, it doesn’t generate the file. And after checking the script, I tried to replicate everything (which is basically a backup and restore), but it doesn’t work because the database structure and fields are different.

> [@yanokwa](#):
>
> What is the specific failure when you do the v2023.2 upgrade?

Basically I do not do the migration I do not get an error but I can trace the container is launched, it ends and does not generate the file and I do not do the migration.

---

_[View the full topic](https://forum.getodk.org/t/migration-data-api/53548)._
