473,396 Members | 1,785 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,396 software developers and data experts.

restore problem

I am trying to restore a postgre dump from a linux server to windows system bu t am not able to do it from pg_restore or pgadmin.

in pgadmin it is saying not a valid archive and if we use pg_restore in command line then it is giving the following error
“pg_restore: [archiver] could not open input file: No such file or directory”

is there a procedure to get the dump from the *nix to windows
Mar 31 '07 #1
5 11238
michaelb
534 Expert 512MB
Welcome to the forum!

Provided that you have a compatible db version you should be able to load a Unix data-dump into your Windows installation.

There is a number of ways in which data dump can be created, and few formats which can be specified for the data file.

First thing you need to know is how this dump was generated, and how it was copied from Unix to Windows.
(One common problem is using incorrect mode - ascii versus binary - while FTP'ing a file between two different platforms)

You may also find helpful reviewing these docs:
Backup and Restore
pg_dump
pg_dumpall
Mar 31 '07 #2
the dump is from PostgreSQL 7.4.5 and i am using 8.1.

Can we restore the dump from one version to another
Apr 2 '07 #3
michaelb
534 Expert 512MB
Generally you should be able to import this data.
You may run into problems with some triggers or functions, but I think they can be addressed on one by one basis.

You really need to look into other questions I asked in my previous posting.
How the dump file was created?
(pg_dump, pg_dumpall)

What is the format of this file?
(text, binary, tgz)

Knowing the name of the file (most importantly the extension) may provide a hint.

In some cases all you need to do in order to import a datafile is
psql -f file-name, but it would be hard to help you without getting this info first.
Apr 2 '07 #4
hi michael,

Tx for the speedy and needy response.
the problem is solved.

The dump was created using
Expand|Select|Wrap|Line Numbers
  1. pg_dump -D 
so when we tried the normal pg_restore it was telling us it is not a valid archive.

I restored it with the following
Expand|Select|Wrap|Line Numbers
  1. psql pg_resore -d <database> < dump
once again tx for your co operation
Apr 4 '07 #5
michaelb
534 Expert 512MB
You're welcome!
Apr 5 '07 #6

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

Similar topics

9
by: Dave | last post by:
When I am trying to use backup or restore from the EM, a dialog box never pops up, and the EM interface locks up. Has anyone else had problems like this? Looks like all other functions from EM...
3
by: butatista | last post by:
Please help SQL Server 2000 Standard I am trying to restore databases on my server and am unable to get them to restore using the database option. For example, the location of my backup...
2
by: Moti.Ba | last post by:
Hello, I need to restore the Master DB in my SQL 2k server (with sp3). The problem is that i don't have SQL backups of this file I only have general backup of the entire c:\ drive i made using...
4
by: ScottH | last post by:
I am running 7.2 with fixpack 10a under W2K. I got a backup from someone else in an attempt to debug a data issue. The other person created the database with UTF-8 (codepage 1208), so I created a...
3
by: Vikrant | last post by:
Friends, Due an application (old) install program problem, Under AIX I could only create DB2 instance, I could also catalog it. Its complex application and I am not expert in creating full...
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...
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
13
by: Andy K | last post by:
Hi , I'm wondering what's going on with a restore I'm trying to do . My DB2 version is a 7.2 on a Linux RH ES 2.1 . I've copy a recent backup that was on NAS for a test on my machine . I...
11
by: Chris | last post by:
I have searched this group for answers and tried the responses. I am trying to Use an full online backup from our production server and apply it to our test server. The Tablespaces in the...
2
by: modeler | last post by:
Hello, I am trying to restore a DB2 9.1 fp2 backup to another DB2 9.1 fp2 machine, both are on Windows. C:\Program Files\IBM\SQLLIB\BIN>db2 -tvf C:\db2_data\test.db2 UPDATE COMMAND OPTIONS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.