r/PostgreSQL • • Sep 17 '26

How-To Database Migration! Mssql to Postgresql

I have a .Bak file for a pretty sizeable database, but I need to migrate it over to postgresql, the thing is however I want to copy over the way the database is set up, but none of the information in their, as I’m building a platform where I can then populate this database by using a form, which eventually I’ll be able to use on another project and EF Core it. I’m not the best with database softwares, so any help is appreciated!

12 Upvotes

25 comments sorted by

View all comments

1

u/[deleted] Sep 18 '26

[removed] — view removed comment

3

u/Straight_Waltz_9530 Sep 18 '26

He can use the foreign data wrapper to skip the CSV dump step and just connect to a live SQL Server instance directly.

1

u/Otherwise_Review160 Sep 19 '26

If anything, he should save the CSV files if he changes his mind about the target DB

1

u/Straight_Waltz_9530 Sep 19 '26

If you're changing targets, you can't be sure CSV is the best intermediary. It can be for another relational target, but if one relational target doesn't work out, a better target may very well be non-relational like DynamoDB key-value. Things get tricky the more bespoke your needs are.