by Ken Task.
Am not a Postgres person, but I can Google:
https://www.postgresql.org/docs/8.1/backup.html
shows both dump and restore of the dump to a server.
One suggestion as to the name of the new database to which you restore ... make the DB names shorter than what you had!
And, the bu script we built to backup the moodle would need to be edited to contain the new DB and DB user/pass if that changed.
SoS', Ken