I fetched error while tried to restore sample dhis2 database from (https://s3-eu-west-1.amazonaws.com/databases.dhis2.org/sierra-leone/2.31/2.31.0/dhis2-db-sierra-leone.sql.gz) into postgres 11.
It was giving error
psql:<>: invalid command \N
My working environment was,
OS: windows 10
Later I downgrade my database version to postgres 10 and everything worked fine and smooth.
This information might be helpful for whom who might want to work on dhis2 with postgres 11.
Hey hi Sarder,
I’m trying to load the sample database 2.29 over 2.29 dhis2 database. But its giving me lot of errors and i dont think anything is been stored in the database.
Can you help me the steps through the same.
Would be grateful. Thanks
Hey Rahul @usfreak13 ,
Which postgres version are you trying to load? What is your server OS (windows/ubuntu)? What is error are you getting during load? Please provide me these information. if you already fixed it out then congratulations :-).
Im using Postgre 10.7 and on windows 10 and trying to upload database for dhis2 2.30. Error is the invalid command /n on the cmd after i run the psql command to load the database.
I guess the error is because of the Postgis extension which is required for 2.30 version and above.
Let me try on the same and if successful will update.
Hi there guys,
I have same problem. I’ve downloaded sierra-leons’ sample data. PG11, Tomcat 9, DHIS 2.34.
psql:dhis2-db-sierra-leone.sql:321750: invalid command \N
have you sold this issue?
as @sohel solved it, try downgrading postgres 11 to postgres 10, that has solved the problem for him, it might solve yours too. , update us if it doesn’t solve the problem
Thanks Hamza. I will try, although it is strange instead of upgrading we are downgrading servers’ version.
Maybe somebody have the sierra-leon sample data for pg11?
If I remember correctly that \N is related to the postgis extension not being installed.
Jaime, everything is installed.
Not the case…
Sorry, maybe I should have said “created”.
Are you sure you did this:
sudo -u postgres psql -c "create extension postgis;" dhis2
Taken from: https://docs.dhis2.org/2.34/en/dhis2_system_administration_guide/installation.html#postgresql-installation
Yes Jaime, I installed it by following the instructions. And I am using Windows 10pro, installed locally. Main intention is to understand how it works and to learn how to create registry for the local community.
I think after I will seek the answer how to complete those tasks
0. Stopped everything
- removed dhis2 database.
- Recrecreated new database
- Restored all data
- Restarted all services