gnumed-bugs
[Top][All Lists]
Advanced

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

Re: [Gnumed-bugs] Problems restoring from a backup - directory ... does


From: Busser, Jim
Subject: Re: [Gnumed-bugs] Problems restoring from a backup - directory ... does not exist
Date: Wed, 14 Jan 2015 12:28:33 +0000

On 2015-01-14, at 2:28 AM, Karsten Hilbert <address@hidden> wrote:

> Let's be extremely cautious here and let's gather data first.
> Please don't take any steps until we agreed upon them.

In my haste to try to get running again, I had already and (however 
inadvisedly) taken some steps.

> What indications do you see that v19 is borked ?
>       - you mention reduced size
>       - anything else ?

Multiple efforts to create a backup from my v19 resulted in the same 
worrisomely small file of 83 Mb compared to what I had been able to back up at 
the very start of my attempted upgrade (393 Mb) so it worried me that there was 
something wrong with my now-existing v19.

I think that my worry was intensified by my inability to get back to my v19 
from inside the client, except I may have been inadvertently logging into a 
newly-downloaded (and incompletely configured) 1.4.9 instead of the 1.4.8 which 
I had been using these last few months. So that could have been an alternate 
explanation to my "difficulty" logging in.

And therefore when I (rightly or wrongly) concluded that I was going to have to 
restore from my 393 Mb backup, I dropped v19 from the database.

So, borked or not, that's gone.

Doing
        sudo su postgres
and changing to a directory for which postgres has permissions
        cd /Library/PostgreSQL/9.3/bin
and checking the status of the server using pg_ctl
        /Library/PostgreSQL/9.3/bin/pg_ctl -D '/Library/PostgreSQL/9.3/data' 
status
returns
        pg_ctl: server is running (PID: 76)
and issuing with the password for postgres
        psql -l
results in
                                  List of databases
    Name    |  Owner   | Encoding |  Collation  |    Ctype    |   Access 
privileges   
------------+----------+----------+-------------+-------------+-----------------------
 gnumed_v18 | gm-dbo   | UTF8     | en_CA       | en_CA       | 
 postgres   | postgres | UTF8     | en_CA.UTF-8 | en_CA.UTF-8 | 
 template0  | postgres | UTF8     | en_CA.UTF-8 | en_CA.UTF-8 | =c/postgres
                                                              : 
postgres=CTc/postgres
 template1  | postgres | UTF8     | en_CA.UTF-8 | en_CA.UTF-8 | =c/postgres
                                                              : 
postgres=CTc/postgres
(4 rows)

and when I issue just
        psql
and am connected to the database 'postgres' I am warned
        psql (8.4.9, server 9.3.1)
        WARNING: psql version 8.4, server version 9.3.
        Some psql features might not work.
        Type "help" for help.
        postgres=#
and then (perhaps not surprisingly, having dropped v19), your suggested
        CREATE DATABASE gnumed_v19borked_backup TEMPLATE gnumed_v19 OWNER 
"gm-dbo";
                alter database gnumed_v19_backup set 
default_transaction_read_only TO on;
                UPDATE pg_database SET datallowconn = False WHERE datname = 
'gnumed_v19borked_backup';
                SELECT pg_database_size('gnumed_v19');
gives
        ERROR: template database "gnumed_v19" does not exist

I do have multiple backups of the two sizes of backups and think that part of 
the size difference

        383 Mb
        85 Mb

the first (383 Mb) being a .tar that expands to two files, a database.sql 
(383.3 Mb) and a roles.sql (530 bytes):

        
backup-gnumed_v19-GNUmed_Team-dhcp-128-189-241-105.ubcsecure.wireless.ubc.ca-2015-01-12-09-59-25-database.sql
        
backup-gnumed_v19-GNUmed_Team-dhcp-128-189-241-105.ubcsecure.wireless.ubc.ca-2015-01-12-09-59-25-roles.sql
        
and the second (85 Mb) being sql.bz2 which expands to 383.1 Mb:

        backup-upgrade-v19-to-v20-MacBook-2.local.sql

-- JIm





reply via email to

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