Re: move dbs from 8.1 to 8.4

Поиск
Список
Период
Сортировка
От Payal Singh
Тема Re: move dbs from 8.1 to 8.4
Дата
Msg-id CANUg7LAEfMdBcv8E+0vry7dQiieb95LOAi6R9z_imDPM8ikaGw@mail.gmail.com
обсуждение исходный текст
Ответ на move dbs from 8.1 to 8.4  (Marc Fromm <Marc.Fromm@wwu.edu>)
Список pgsql-admin
Can you use '-v' with pg_dumpall and output to the log file? That might help. Likely something is not right with the individual pg_dump processes that work inside the pg_dumpall.

Payal Singh,
OmniTi Computer Consulting Inc.
Junior Database Architect,
Phone: 240.646.0770 x 253


On Thu, Oct 10, 2013 at 4:17 PM, Marc Fromm <Marc.Fromm@wwu.edu> 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.

    • 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

 


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

Предыдущее
От: reiner peterke
Дата:
Сообщение: Re: uuid extension not available
Следующее
От: Marc Fromm
Дата:
Сообщение: Re: move dbs from 8.1 to 8.4