From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>, "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:54:34 |
Message-ID: | 5257140A.7070000@pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 10/10/2013 01:17 PM, Marc Fromm wrote:
>
> 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.
>
> o *gunzip postgresql-all-10-10-2013_04-07-databases.gz*
> o *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
>
It would be helpful to see any error messages from the client or the
log. But lacking that info, my first suggestion is to be sure that you
are using pg_dumpall from the *new* version of PostgreSQL and *not*
trying to restore a dump taken with an old version into the new version
of the database. It's not clear which versions of the clients you are
using from your message but I'm guessing this may be part of your issue.
The second suggestion is to upgrade to a recent version of PostgreSQL.
If you are going to the effort of an upgrade it seems like a bit of a
waste of time to go to 8.4 which is only supported for a few more months
when you could move to 9.3 and have a version supported for nearly five
more years plus all the feature and performance improvements that have
been made in the several years since 8.4 was released.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Fromm | 2013-10-10 21:07:33 | Re: move dbs from 8.1 to 8.4 |
Previous Message | Marc Fromm | 2013-10-10 20:53:58 | Re: move dbs from 8.1 to 8.4 |