restore postgres database from psql file with force using command line code example Example: restore postgres database from sql file psql -d database_name -f backup.sql