[Planetlab-devel] upgrading from 8.1 to 8.2 postgresql

Barış Metin baris at metin.org
Fri Oct 16 04:00:03 EDT 2009


Hi Marc,

I may have made an error copying and pasting lines from the command
history (actually apparently I did mess it up). Attached you can find
a script that will do the upgrade and migration. This basically wraps
your upgrade script and adds the additional steps required to migrate
the data.

On Fri, Oct 16, 2009 at 12:53 AM, Marc Fiuczynski <mef at cs.princeton.edu> wrote:
> Hi Baris,
>
> I made some progress by altering your recipe to the following:
>
> /etc/plc.d/db dump
> dropdb -U postgres planetlab5
> dropdb -U postgres drupal
> service plc stop
> rm -rf /var/lib/pgsql/data
> # upgrage postgresql (8.1 to 8.2)
>
> /etc/plc.d/postgres start
> # this does a initdb, createdb, etc., but also brings in the sql definitions
> /etc/plc.d/db restore /var/lib/pgsql/backups/planetlab5.sql
> /var/lib/pgsql/backups/drupal.sql
>
> #watching the above restore it gets a bit unhappy because various tables,
> views, relations exist
> #which may be a problem
>
> service postgresql stop
> service plc start
>
> as part of /etc/plc.d/db start the call to db-config is unhappy that the
> default system administrator account was deleted.  I have not had a chance
> to look into this further, but I am guessing the restore above did not work
> fully.  Will look at it more tomorrow, as I need to get onto a plane from
> Denver to Philadelphia.
>
> Cheers,
> Marc
>
>
>>
>>
>> This seems to work fine in my test setup.
>>
>> On Thu, Oct 15, 2009 at 4:22 PM, Marc Fiuczynski <mef at cs.princeton.edu>
>> wrote:
>>>
>>> Hi Baris,
>>>
>>> I just thought I'd give the 8.1 to 8.2 upgrade a shot.  I've not
>>> succeeded
>>> yet, but here are my steps:
>>>
>>> /etc/plc.d/db dump
>>> service plc stop
>>> service postgresql stop
>>> #run my 8.1-to-8.2 rpm upgrade
>>>
>>> Now when I try to start postgresql it complains about there being an old
>>> database format.  Since I've dumped the data, I guessed it was ok to
>>> remove
>>> (or move) /var/lib/pgsql/data followed by running:
>>>
>>> service postgresql initdb
>>> service postgresql start
>>>
>>> At this point I was hoping I could either restore the dumped databases,
>>> but
>>> was getting errors wrt pgsqluser authentication not working.
>>>
>>> So I manually ran "/etc/plc.d/postgresql start", but this doesn't do the
>>> trick either.
>>>
>>> psql -U pgsqluser -c '' template1
>>> + psql -U postgres -c 'CREATE USER pgsqluser PASSWORD
>>> '\''BLANKED_OUT'\'''
>>> template1
>>> psql: FATAL:  Ident authentication failed for user "postgres"
>>>
>>> Any suggestions?
>>>
>>> Marc
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at lists.planet-lab.org
>>> https://lists.planet-lab.org/mailman/listinfo/devel
>>>
>>
>>
>>
>> --
>> Baris
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.planet-lab.org
>> https://lists.planet-lab.org/mailman/listinfo/devel
>
> _______________________________________________
> Devel mailing list
> Devel at lists.planet-lab.org
> https://lists.planet-lab.org/mailman/listinfo/devel
>



-- 
Baris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: migrate_pg.sh
Type: application/x-sh
Size: 1779 bytes
Desc: not available
Url : http://lists.planet-lab.org/pipermail/devel/attachments/20091016/a60f977b/migrate_pg-0001.sh


More information about the Devel mailing list