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: Yusif Suleiman
Subject: Re: [Health] Restore data to new installation
Date: Mon, 9 May 2022 08:07:13 +0000

Thank you, Gerald.
I check the files with 'ls' command, all files are in the directory.
I use the 'psql newdb' then copy the syntax one after the other, but all in vain.

Here are my repeated efforts. Please have look at. What have I miss?

user@localhost:~/Desktop> su
Password:

localhost:/home/user/Desktop # su postgres
postgres@localhost:/home/user/Desktop> ls
backup_Fitrah_2022-04-18_143018
backup_Fitrah_DB_2022-04-18_143054.gz
gnuhealth_Fitrah_DB_fs_backup_2022-04-18_143054.tar.gz
gnuhealth_Fitrah_DB_with_fs_backup_2022-04-18_143054.tar

postgres@localhost:/home/user/Desktop> createdb newdb --encoding='UTF-8' --owner=tryton
createdb: error: database creation failed: ERROR:  database "newdb" already exists

postgres@localhost:/home/user/Desktop> psql newdb gnuhealth_Fitrah_DB_with_fs_backup_2022-04-18_143054.tar
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "gnuhealth_Fitrah_DB_with_fs_backup_2022-04-18_143054.tar" does not exist

postgres@localhost:/home/user/Desktop> psql newdb gnuhealth_Fitrah_DB_fs_backup_2022-04-18_143054.tar.gz
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "gnuhealth_Fitrah_DB_fs_backup_2022-04-18_143054.tar.gz" does not exist

postgres@localhost:/home/user/Desktop> psql newdb gnuhealth_Fitrah_DB_fs_backup_2022-04-18_143054
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "gnuhealth_Fitrah_DB_fs_backup_2022-04-18_143054" does not exist

postgres@localhost:/home/user/Desktop> psql newdb backup_Fitrah_DB_2022-04-18_143054.gz
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "backup_Fitrah_DB_2022-04-18_143054.gz" does not exist

postgres@localhost:/home/user/Desktop> psql newdb backup_Fitrah_DB_2022-04-18_143054
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "backup_Fitrah_DB_2022-04-18_143054" does not exist

Yusuf

From: Health <health-bounces+yusifsuleiman=hotmail.com@gnu.org> on behalf of Gerald Wiese <wiese@gnuhealth.org>
Sent: Saturday, May 7, 2022 12:49 PM
To: health@gnu.org <health@gnu.org>
Subject: Re: [Health] Restore data to new installation
 

Hey Yusuf,

as the message says your backup file is not found.

Check your files in current working directory by typing "ls" to see if it is there. Did you copy it to your machine where you want to restore?

Anyway don't leave the "<".

Best

Gerald


On 5/7/22 12:30, Yusif Suleiman wrote:
Dear Axel,
Looks like you were trapped in the ditch between vanilla and package based
installation. From your original post:

>>>You are very right.
I now check to see the owner of the db:
The main gnuhealth_database & the new_db I just created are own by tryton, and postgres is own by postgres, according to the list.

I also try to follow this instructions below.

Create an empty database:
su postgres
createdb mydb --encoding='UTF-8' --owner=tryton
psql mydb < backup_Fitrah_DB_2022-04-18_143054
(or what your backup is called)
HTH
Axel

However, while it seem like I am getting it right.
# su postgres
postgres@localhost:/home/user> createdb newdb --encoding='UTF-8' --owner=tryton

then, this error came again
postgres@localhost:/home/user> psql newdb < backup_Fitrah_DB_2022-04-18_143054
bash: backup_Fitrah_DB_2022-04-18_143054: No such file or directory

postgres@localhost:/home/user> psql newdb backup_Fitrah_DB_2022-04-18_143054
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "backup_Fitrah_DB_2022-04-18_143054" does not exist

Here I use the complete path of the backup file, with same error
postgres@localhost:/home/user> psql newdb < backup_gnuhealth_Fitrah_DB_fs_2022-04-18_143054
bash: backup_gnuhealth_Fitrah_DB_fs_2022-04-18_143054: No such file or directory

I am still trapped in that ditch, please help.
Yusuf






reply via email to

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