gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] problems to restore DB in Debian Testing


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] problems to restore DB in Debian Testing
Date: Wed, 3 Mar 2010 11:01:46 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Mar 03, 2010 at 12:23:00AM -0300, Rogerio Luz Coelho wrote:

> when I try to restore a gnumed_v12 DB:
> 
> sh gm-restore_database.sh

What does this say:

        $> ls -l `which sh`

It is probably dash rather than bash ?

Debian Testing switched the default shell from bash to dash.

Try running it like so: ./gm-restore_database.sh in which
case it will use the "bash" definer in the first line of
that script (which is needed).

> ==> Reading configuration ...
> gm-restore_database.sh: 58: [[: not found

The shell you are using doesn't seem to support the "[["
operator. Use bash.

> ==> Unpacking backup file ...
> gm-restore_database.sh: 93: [[: not found

Same thing. Bash is needed.

> tar: Record size = 8 blocks
> -rwxrwxrwx root/root   4702359 2010-02-15 01:36       
> backup-gnumed_v12-DrRogerioLuzCoelho-consultorio-2010-02-15-01-36-38-database.sql
> -rwxrwxrwx root/root      5197 2010-02-15 01:36       
> backup-gnumed_v12-DrRogerioLuzCoelho-consultorio-2010-02-15-01-36-38-roles.sql
> 
> ==> Adjusting GNUmed roles ...
> 
>    You will now be shown the roles backup file.
>    Please edit it to only include the roles you need for GNUmed.
> 
>    Remember that in PostgreSQL scripts the comment marker is "--".
> 
> read: 110: Illegal option -e

The read command of your shell does not support -e. Again,
using bash will fix that.

> ==> Checking target database status ...
> head: não foi possível abrir
> "backup-gnumed_v12-DrRogerioLuzCoelho-consultorio-2010-02-15-01-36-38.tar.bz2-database.sql"
> para leitura: Arquivo ou diretório não encontrado
>     ERROR: Backup does not create target database . Aborting.

That is likely fallout from earlier problems.

> ## when it opens the "roles" file with editor it is absolutely empty

Given this:

> tar: Record size = 8 blocks
> -rwxrwxrwx root/root   4702359 2010-02-15 01:36       
> backup-gnumed_v12-DrRogerioLuzCoelho-consultorio-2010-02-15-01-36-38-database.sql
> -rwxrwxrwx root/root      5197 2010-02-15 01:36       
> backup-gnumed_v12-DrRogerioLuzCoelho-consultorio-2010-02-15-01-36-38-roles.sql

it shouldn't be so there's some problem with unpacking (as
said, likely due to earlier problems).

> ## do not know where the log file is

It fails before it starts logging to a file. You did the
right thing in sending the console output.

The log file will be below $LOG_BASE which is defined in
/etc/gnumed/gnumed-restore.conf.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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