I am trying to restore pg_dump taken with this command from another server.
sudo -u postgres pg_dump --verbose --format=custom --file=pg-backup.sql -U postgres salesDB
After I copied the pg-backup.sql file, I try to restore using this command
sudo -u postgres pg_restore --verbose --jobs=`nproc` -f pg-backup.sql
The pg-backup.sql file is 13 GB in size. Pg-restore works for 4 hours, scrolling through the data on my screen all the time. No mistakes.
But when I execute this statement from the psql session
SELECT pg_size_pretty(pg_database_size('salesDB'));
I get a size of 5377 kB. WHAT? It should at least be 1 GB by now. I am completely lost. All this data scrolls my screen, and I canβt prove that it goes anywhere. No disk usage.
reference
source share