From: | Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu> |
---|---|
To: | Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: move dbs from 8.1 to 8.4 |
Date: | 2013-10-10 20:53:58 |
Message-ID: | 93361C67E4EE844A80935863A4FF4B6C076EEC73@Exch2010MB-2.univ.dir.wwu.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
I also realized that during the restore any database with latin1 encoding is not created at all
psql:pgdbs:167: ERROR: encoding LATIN1 does not match locale en_US.UTF-8
DETAIL: The chosen LC_CTYPE setting requires encoding UTF8.
About half my databases are latin1.
My problem is now two fold, how do I migrate the databases with their tables and data and migrate the latin1 encoded databases?
Thanks
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Marc Fromm
Sent: Thursday, October 10, 2013 1:17 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] move dbs from 8.1 to 8.4
I built a new server running centos 6.4 and postgresql 8.4. I backed up all the databases from the old server running fedora and postgresql 8.1 using this script.
#!/bin/bash
# Backup all Postgresql databases
# Location of the backup logfile.
logfile="/var/lib/pgsql/backups/logs/pg_back.log"
# Location to place backups.
backup_dir="/var/lib/pgsql/backups"
touch $logfile
timeslot=`date +%m-%d-%Y_%H-%M`
timeinfo=`date '+%T-%F'`
/usr/bin/vacuumdb -azh 127.0.0.1 -U postgres
/usr/bin/pg_dumpall -ch 127.0.0.1 -U postgres | gzip > "$backup_dir/postgresql-all-$timeslot-databases.gz"
echo "Backup of all databses complete at $timeinfo for time slot $timeslot--pg_dumpall." >> $logfile
The new server is running postgresql 8.4.
When I restore the databases, with the commands below, only the databases are created, no tables and no data is restored.
* gunzip postgresql-all-10-10-2013_04-07-databases.gz
* psql -U postgres -f postgresql-all-10-10-2013_04-07-databases postgres
The above works between two different servers that both run 8.1.
What am I missing to restore all my databases with tables and data from 8.1 to the new 8.4?
Thanks
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Crawford | 2013-10-10 20:54:34 | Re: move dbs from 8.1 to 8.4 |
Previous Message | Payal Singh | 2013-10-10 20:52:53 | Re: move dbs from 8.1 to 8.4 |