take Backup into .psql format as
pg_dump -d database_name -U username -f /tmp/filename.psql -h localhost -port 5432
and restore this file using command as
psql -d database_name -U username -f /tmp/backup_file.psql