473,320 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

pg_dump backup doesnt restore everything - things missing... restore howto required

I have a cronned perl script that runs on a different server.

when I try to restore it to the server below things dont copy across correctly.

the target server is described below.

debian 4.0 - Linux testbox.jumboentertainment.com.au 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux

with the latest apt-get installation of postgres

PostgreSQL version 7.4.17 (With schemas)
/etc/postgresql/7.4/main/pg_hba.conf

I am creating a database that has sql_ascii encoding, owner is postges,
priviledges granted public to all, and I try to restore from the following script.

the backups from the other server, are the output of the following script,
which has been slightly modded for publication reasons - but runs fine.

#!/bin/sh

HOME=~root/
STAMP=`date "+%Y%m%d"`
TIME=`date "+%H-%M-%S"`
DATABASENAME=???????
BACKUPDIR=/var/lib/postgresql/7.4/backups
BACKUPFILE=${DATABASENAME}_backup_${STAMP}_${TIME} .custom

echo ----------------------------------------------------
echo BEGINNING galaxy DATABASE BACKUP
echo SCHEDULE @ 05 mins - 01, - 10, 12, 14, 16,
echo 17, 19, 21, 23,
echo "--- This being at - ${STAMP}_${TIME}" ---
echo ----------------------------------------------------
echo -----
echo START
echo -----
echo -------------
echo GETTING FILES
echo -------------
cd $BACKUPDIR
echo "Backing up $DATABASENAME to file $BACKUPFILE in directory $BACKUPDIR"
echo ---------------
echo CREATING BACKUP
echo ---------------
pg_dump -Fc -f -Z 9 $BACKUPFILE -U postgres $DATABASENAME
echo "Finished creating backup file. Exit status=$?"
#echo .
#echo ----------------------
#echo LOCATE FREAK SERVER AND SEND
#echo ----------------------
#echo .
#BACKUPFTPSERVER=10.0.0.9
#echo "Sending backup file to $BACKUPFTPSERVER"
#echo "bin
# cd jumbo
# put $BACKUPFILE
# bye
# " | ftp $BACKUPFTPSERVER
#echo "Finished sending backup file to $BACKUPFTPSERVER. Exit status=$?"
#echo .
#echo ----------------------
#echo LOCATE SERVER AND SEND
#echo ----------------------
#echo .
#BACKUPFTPSERVER=
#echo "Sending backup file to $BACKUPFTPSERVER"
#echo "bin
#cd jumbo
#put $BACKUPFILE
#bye
#" | ftp $BACKUPFTPSERVER
#echo "Finished sending backup file to $BACKUPFTPSERVER. Exit status=$?"
#
echo .
echo ----
echo DONE
echo ----
echo .
echo ------ FINISHED backup testbox.jumboentertainment.com.au ------


when I restore this database - its missing all kinds of things

-The public schema is present, but the catalog and sync schemas are missing
-The user groups are missing, and have to be copied via sql pad.
-The language isnt created,
-Triggers have to be manually copied into the
-sql pad of pgadmin III - then run on the testbox server, to copy the sql that
is missing - is there a better way to ensure that everything about this database
is backed up and restored - in one howto or something?

any help would be greatly appreciated - send email to development@jumboentertainment.com.au
Sep 19 '07 #1
0 3247

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: deprins | last post by:
Hello, I have run into some problems with logfiles and backup logfiles (MS SQL server). I have read much about them but uptil now I dont seem to grasp how it works. Specially the part of working...
0
by: Martin Hart | last post by:
Hi, postgresql 7.4beta4 on linux and postgresql 7.3.4 on linux We have a database that we routinely backup using "pg_dump -a" We have to do this (dump the data only) because of various...
4
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but...
0
by: Aienthiwan | last post by:
Hello all, I'm running a debian server and recently updated my version of PostgreSQL to "unstable", that being v7.4.1. I had no trouble at all getting everything up to date and going. But my...
9
by: Alexander Cohen | last post by:
(sorry for the double post if there is one - i sent the mail to the lisyt from the wrong address) Hi, Im passing this in the commmand line to start up the PostgreSQL server: ../pg_ctl start...
1
by: Neil Zanella | last post by:
Hello, I have an SQL database which I create with: psql -f create.sql foodb I then access this database and perform several insertions, modifications, and deletions. Finally, I want to...
2
by: Anony Mous | last post by:
Hi, I've seen in previous posts that recommended practice for database backup is to run the dump utility twice. Once for schema only and a second time for data only (I think). Up to know,...
0
by: prerak_v_shah | last post by:
Hi All, These days I was working on IBM DB2 database for windows with my .Net Application. Now, it was required to backup database created on one machine to the other machine. I was also able...
10
by: Michael Hoffmann | last post by:
Hello, I hope this doesn't come across as totally newbieish, but I've been searching the web and the IBM docs until smoke is coming out of my head. Scenario: We are trying to take primitive...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.