|
Forgive any ignorance as my backround in SQL is strongly in MSSQL and mySQL and I'm no longer an active developer (5 years~) I have a SQL Server backup that I am trying to restore onto my Mac. I have Postgres installed and running and grabbed Postico for a GUI to connect to it so I could run some queries and populate an excel file. I'm having a lot of trouble figuring out how to restore the backup (been all over this: http://www.postgresql.org/docs/9.1/static/backup-dump.html#BACKUP-DUMP-RESTORE with no luck ) I also tried the pg_restore command and had no luck. Then I tried it here in Postico Along with the CREATE but backup didn't work either... Again forgive my ignorance. I did LAMP development with mySQL way back in 2001-2004, then moved into the .NET and MS SQL world. Doing this poo poo on a mac is silly enough but with postgres I'm just in completely unfamiliar territory. Thanks in advance.
|
# ? Apr 14, 2016 20:21 |
|
|
# ? Apr 24, 2024 11:33 |
|
If the backup was made using pg_dump you'll have to manually recreate the users/roles and a blank database first and then restore with this command:code:
code:
wash bucket fucked around with this message at 21:10 on Apr 14, 2016 |
# ? Apr 14, 2016 20:57 |
|
McCracAttack posted:If the backup was made using pg_dump you'll have to manually recreate the users/roles and a blank database first and then restore with this command: The backup was made from a SQL Server database and the .bak file was given to me. Is there a way to convert or map/migrate?
|
# ? Apr 15, 2016 14:10 |
|
Shadow posted:The backup was made from a SQL Server database and the .bak file was given to me. Is there a way to convert or map/migrate? Sorry, I only know about backing up from and restoring to postgres. Might be possible but I can't say for sure. Good luck with it. Edit: You might find a lead here.
|
# ? Apr 15, 2016 17:48 |
|
I might try that approach but I was able to get someone (ahem) to spin up a SQL Server instance and give me access to it. For my immediate purposes, this is going to solve the issue, but for my education, I'll try to remember to see if your suggestion works to be a good SHSC citizen!
|
# ? Apr 18, 2016 16:37 |
|
|
# ? Apr 24, 2024 11:33 |
|
pg_restore is a UNIX terminal command, not an SQL statement keyword. Try running that same line in the terminal of the server you have the database on.
|
# ? Apr 20, 2016 22:33 |