gnumed-devel
[Top][All Lists]
Advanced

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

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


From: Rogerio Luz Coelho
Subject: Re: [Gnumed-devel] Re: problems to restore DB in Debian Testing
Date: Tue, 9 Mar 2010 18:46:36 -0300

The script again gave an error like "could not change to directory /root/gm-restore ....."

I fixed this by doing a

su postgres

then:

postgres$ cp -R /backup-file.tar.gz ~/

postgres$ gm-restore ./backup-file.tar.gz

Worked ... I do not know why postgres got cut of it's privileges



Rogerio

2010/3/9 Karsten Hilbert <address@hidden>
On Tue, Mar 09, 2010 at 12:26:27PM +0100, Andreas Tille wrote:

> > Your shell is bash, as it should (for the restore).
>
> Back from holiday I try to work down my mail backlog.  I wonder why the first
> line
>
>    #!/bin/bash
>
> does not have the effect of using bash as command interpreter.

I have ben wondering about that, too, but didn't really see
any further way to debug this.

> PS: It is always a good idea not to relay on specific Bash features if not
>     really necessary.

I agree.

>  IMHO the same effect as
>
>       if [[ "$BACKUP" =~ .*\.bz2 ]] ; then
>
>     can be reached by
>
>       if echo "$BACKUP" | grep -q "\.bz2$" ; then
>
>     (UNTESTED!) and works for any shell.

Even better would be to use "test", I suppose.

I am open to patches.

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]