Re: Debian upgrade with PostgreSQL

Поиск
Список
Период
Сортировка
От Vincent Veyron
Тема Re: Debian upgrade with PostgreSQL
Дата
Msg-id 1343678318.2438.35.camel@asus-1001PX.home
обсуждение исходный текст
Ответ на Debian upgrade with PostgreSQL  (Patrick Ernst <pernst@mpi-inf.mpg.de>)
Список pgsql-general
Le lundi 30 juillet 2012 à 12:57 +0200, Patrick Ernst a écrit :

> We are running PostgreSQL 8.3 on a Debian Lenny system. Since the system
> is outdated, we want to update to Debian Squeeze.
>
> Based on your knowledge and experience are there any special
> preparations for PostgreSQL we have to take care of? Or can you give us
> some tips how we should approach the system upgrade so that everything
> runs smoothly?


Hi,

Below are the notes I took for step-by-step instructions. It went
smoothly.

uname -a :
Linux sd-21096 2.6.32-bpo.4-amd64 #1 SMP Thu Apr 8 10:20:24 UTC 2010
x86_64 GNU/Linux

#2012-03-30 upgrade from Lenny to Squeeze

#modify /etc/fstab to use uuid
#this command lists the uuid values to use
ls -l /dev/disk/by-uuid

#backup
pg_dumpall > 8.3.out

#check package selection, delete all those marked 'hold'
dpkg --get-selections "*" > paquets-actuels.txt

#check w/ aptitude, hold must be empty
aptitude g

#edit /etc/apt/sources.list
sed -i 's/lenny/squeeze/g' /etc/apt/sources.list
#replace volatile repo w/squeeze-updates
deb http://ftp.debian.org/debian squeeze-updates main

#erase /etc/apt/preferences


#languages : add fr_FR@euro ISO-8859-15
dpkg-reconfigure locales

#clean cache
apt-get clean

#launch dist-upgrade
apt-get update
apt-get dist-upgrade

#reconfigure sysv-rc

#remove unwanted packages
update-rc.d -f atd remove
update-rc.d -f bind9 remove
update-rc.d -f mdadm remove

#edit /etc/init.d/<package>
# Required-Start:    none
# Required-Stop:     none

#the following 3 packages have new configuration files
#the new file is edited manually

#reconfigure ssh
cat >> /etc/ssh/ssh_config
#avoid timeout of backup scripts
SetupTimeOut 600

#reconfigure logrotate
/etc/logrotate.d/apache2

#reconfigure apache2
/etc/apache2/sites-available/default-ssl
/etc/apache2/apache2.conf
/etc/apache2/conf.d/security
/etc/apache2/mods-available/mime.conf

#Enable dependency based boot system
dpkg-reconfigure sysv-rc

#remove previous postgresql version
apt-get remove postgresql-8.3 postgresql-client-8.3 postgresql-doc-8.3
postgresql-plperl-8.3

#remove unused packages
apt-get autoremove

#install new postgresql version
apt-get install postgresql postgresql-plperl-8.4

#résultat
Paramétrage de postgresql-8.4 (8.4.11-0squeeze1) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main,
data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf
to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_hba.conf
to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_ident.conf
to /etc/postgresql/8.4/main...
Configuring postgresql.conf to use port 5432...
update-alternatives: utilisation de
« /usr/share/postgresql/8.4/man/man1/postmaster.1.gz » pour fournir
« /usr/share/man/man1/postmaster.1.gz » (postmaster.1.gz) en mode
automatique.

#edit /etc/postgresql/8.4/main/postgresql.conf
ssl=off

#restore from dumpall
psql -f 8.3.out postgres

#remove unwanted stuff
apt-get purge portmap nfs-common

#clean up
apt-get autoremove


Done.



--
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres assurances et des dossiers contentieux pour le service juridique


В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: conversion from epoch
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: conversion from epoch