restore plain sql file in table pgsql code example Example: restore postgres database from sql file psql -d database_name -f backup.sql