Transfer data to a new installation

I tried to copy data from one installation to another one (both trytond version 6) by creating an sql dump from the origin and importing it using the command
sudo -u postgres psql -h localhost -d -U -f *.sql
The terminal output confirms that the dump is imported but when trying to update the database with
rytond-admin -c trytond.conf -d -m -vv
I get the error ‘could not load database’
Can anyone help me with this? Is there another way to copy data from one installation to another?

I’m always using the user who owns the database, and is used to connect to the database with Tryton. Make sure you only dump your particular database and not the others.

To create a new database:

testadmin@docsrv:~$ sudo -u postgres createdb -O <the-user> <the-db>

And import your SQL dump with

testadmin@docsrv:~$ psql -d <the-db> -U <the-user> -h localhost -f <sql-dump.sql>

Probably because the user you are using to connect to the database doesn’t have access.

I’m missing the database name here

Thanks edbo for another clear protocol. I followed it and could transfer the database.
In my last line of above post I did indeed forget the database name but that was not the origin of the error since I entered the command correctly in the terminal.
I keep working on the learning curve.