[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: |
Mon, 9 May 2022 11:13:01 +0100 |
Dear Yusif
Just some general comments. Because I am focus on the vanilla
installation, they might not apply to this, but at least some general
tips on the commands you're trying to run
On Mon, 9 May 2022 08:07:13
+0000 Yusif Suleiman <yusifsuleiman@hotmail.com> wrote:
> 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:
>
Be careful to use only "su" instead of "su -", specially related to
environment variables. Use "sudo whenever you can.
>
> postgres@localhost:/home/user/Desktop> createdb newdb
> --encoding='UTF-8' --owner=tryton createdb: error: database creation
> failed: ERROR: database "newdb" already exists
Basically, the DB already exists, so you can not create it again. You
would need to drop it first if you want to start from scratch.
>
> 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
>
A couple of issues here:
1) The "gnuhealth_Fitrah_DB_with_fs_backup_2022-04-18_143054.tar" is a
tar file. You need to extract them first, because it has both the
filesystem and the database dump (usually it ends in .sql). It is that
file the one you need to load.
2) You forgot the "<" redirector on psql. If you want to load a
database dump, you need to redirect the file to be processed
example:
psql newdb < health40.sql (or whatever name you have for your db)
PS: When things get a bit stuck, is best to try to solve them
interactively, in GNU Health Matrix chat.
I recommend you join us in the GNU Health matrix space.
https://matrix.to/#/#gnuhealth-space:matrix.org
There you can find all the rooms related to the GH ecosystem.
All the best
Luis
- [Health] Restore data to new installation, Yusif Suleiman, 2022/05/05
- Re: [Health] Restore data to new installation, Armand MPASSY-NZOUMBA, 2022/05/05
- Re: [Health] Restore data to new installation, Luis Falcon, 2022/05/05
- Re: [Health] Restore data to new installation, Yusif Suleiman, 2022/05/06
- Re: [Health] Restore data to new installation, Axel Braun, 2022/05/06
- Re: [Health] Restore data to new installation, Yusif Suleiman, 2022/05/07
- Re: [Health] Restore data to new installation, Gerald Wiese, 2022/05/07
- Re: [Health] Restore data to new installation, Yusif Suleiman, 2022/05/09
- Re: [Health] Restore data to new installation,
Luis Falcon <=
- Re: [Health] Restore data to new installation, Yusif Suleiman, 2022/05/09