X
Xata2mo ago
Kaligraphy

Migrating data from A DB in one workspace to another DB in another workspace breaks my app

My workplace contracted third parties to help quickly build a CMS because we have so much on our plate. We used Xata, and can’t invite them to our main workspace because data privacy reasons. Now the project from 3rd party has been delivered, it works on their workspace -> database, but we want to have this on a db in our main workspace. I tried xata dump -f schema.json and xata init —schema.json, but got error about incorrect format. Since both DBs are native PG DBs, i ran pg_dump and pg_restore, which worked with some errors To use the database from our main workspace, should be straightforward, i removed old Xata files, and ran xata init and later xata pull to set up the project with the intended db. This worked, but breaks so may others things, id and xata_id no longer being “aliased” What is the best way to switch workspaces? What did I miss?
2 Replies
cmck
cmck2mo ago
Hi there, thanks for reaching out. So pg_dump and pg_restore is the recommended approach for moving databases from one workspace to another. Can you share some examples of the errors you encountered or examples of things that broke? Can you clarify what you mean by the "alias" for id and xata_id? There's a known issue regarding certain methods that expect one or the other, unfortunately.
Kaligraphy
KaligraphyOP2mo ago
here are some of the errors, truncated inbtween:

Did you find this page helpful?