Backup with:
pg_dump -F tar -i -c -h ${db_hostname} -U ${db_username} -f ${file} ${db_name}

And following by:
pg_restore -c -h ${db_hostname} -U ${db_username} -d ${db_name} ${file}

And you...