ArchLinux PostgreSQL 9.3 to 9.4 migration

By on 22 janvier 2015, in ArchLinux, Boulot, Informatique, Journal, System administration

This one was so quick, I still can’t believe it’s finished. This was about:

sudo pacman -Syu postgresql postgresql-libs postgresql-old-upgrade
systemctl stop postgresql
sudo su - postgres -c 'mv /var/lib/postgres/data /var/lib/postgres/olddata'
sudo su - postgres -c 'initdb --locale fr_FR.utf8 -E UTF8 -D /var/lib/postgres/data'
sudo su - postgres -c 'pg_upgrade -d /var/lib/postgres/olddata/ -D /var/lib/postgres/data/ -b /opt/pgsql-9.3/bin/ -B /usr/bin/'

And boom:

sudo systemctl restart postgresql

And that’s all. Wanna read the reference?