Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract zip file to tar in postgresql

I want to Download DVD Rental Sample Database from http://www.postgresqltutorial.com/postgresql-sample-database/ The database file is in zipformat ( dvdrental.zip) so I need to extract it to dvdrental.tar I have no .tar program in my computer. How can I extract the zip file to dvdrental.tar ?

like image 262
sara Avatar asked Oct 14 '25 18:10

sara


1 Answers

So, I came across the same problem. The way i fixed it was to download:

  1. "The Unarchiver"
  2. Go to downloads and select your .zip file, open with: "the unachiver.app" (you should now see a .tar file)
  3. Go to your terminal and run this command: pg_restore -U postgres -d dvdrental /Users/username/Downloads/dvdrental.tar
  4. Change username to your username. you might have to change the path depending on where your now .tar file is.
  5. You should now see all the tables
like image 136
JCastillo Avatar answered Oct 17 '25 12:10

JCastillo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!