Error loading example PostgreSQL database: "Could not find header for file ..."
restore.sql is a plain SQL statement file in your "dvdrental.tar" file. First create your db with the statement below;

CREATE DATABASE db_name ENCODING = 'UTF8';


After that, instead of using pg_restore you can use psql.

psql --echo-all --file=restore.sql db_name