health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] Restore data to new installation


From: Luis Falcon
Subject: Re: [Health] Restore data to new installation
Date: Thu, 5 May 2022 09:44:09 +0100

Good morning, Yusif!

On Wed, 4 May 2022 20:26:34 +0000
Yusif Suleiman <yusifsuleiman@hotmail.com> wrote:

> Dear All,
> I have two gnuhealth installed, the first one(HaemaDB) is working in
> a laboratory for production and the second one (CLIDB) is new
> installation. Both installations are of the same system version
> (Opensuse leap 13.5, gnuhealth 3.8.0-lp153.4.3.1, gnuhealth client
> 3.8.1-bp153.2.4). I do backup the data from the first system
> (HaemaDB) and I want to restore the data into the second system
> (CLIDB) database.
> 
> I follow the wiki instructions below. The backup files are located on
> new installation desktop (CLIDB). but I couldn't succeed in restoring
> the data.
> 
> Please, what am I miss.
> Regards,
> Yusuf
> 
> # cd Desktop (change to backup files directory)
> 
> # createdb CLIDB (Am not sure which database name to use,

Although you could use any DB name, when doing a restore, the best is
to use the same database name as in the original, because the
attachments have the prefix of the DB.

> 1st, 2nd or to create new out of the two, I try all) createdb: error:
> could not connect to database template1: connection to server on
> socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role
> "root" does not exist
> 

That means that you're trying to restore the DB using the OS user
"root", and there's is no postgres user associated to it.
My advice: Never use "root" user in GNU Health (or pretty much
anything).

In the standard (vanilla) installation, we use the "gnuhealth" user.

To create the db user associated to gnuhealth user, follow the same
steps as in the installation guide 

See:
https://en.wikibooks.org/wiki/GNU_Health/Installation#Creating_the_Database_User

> # gunzip backup_HaemaDB_2022-04-18_143054.gz (this command does not
> return any error)
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does
> not exist

Due to the same reason with the "root" user I just explained.

Happy & healthy hacking!
Luis
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]