Transfer postgresql to new computer

Hope someone can help me.

I would like to put the postgresql database on a newer computer.
On the new computer I have already installed postgresql and pgadmin4.
Now i have to confess i am not really familiar with databases. So i would like to know what is the best way to copy all server information (database and users) the the new computer. I know there are several ways to make a backup. But wich is best? And how to do this?
For your information. Mairlist is not installed on the same computer…

Hope anyone can share an idea on how to fix this

At this moment I have got the mairlistpc connected to the new database on the new pc.
I have tried to import an backup in mairlist database app, wich was made from the old database into the new one. The first time i recieved an error after importing (wich took a few hours)
Now i have made my locationfolders exactly the same as in my old database configuration.
Should importing a backup work now?
At this moment i am trying this, but again because of the 20.000 items, it will take a few hours.
I will add a message here if it is working or not…

Backup/restore through the mAirListDB clone function will take very long, as it copies the tables row by row - this is so it convert between different SQL types which may have varying field types.

Usually you would just go with the built-in tools from PostgreSQL, namely pg_dump and pg_restore.

These are command line tools, but if you are using pgAdmin to manage your PostgreSQL server and prefer to work with a GUI, it wraps them into menu commands, very convenient.

Thx for your help.
I have been searching on help for pg_dump and it was a lot easier then i expected.
Problem solved!