Обсуждение: 6.5 data export issues
Hello all, I've currently got a couple of pg databases (6.5) at work on a RedHat box that I'm looking to consolidate and move to a server with 7.2 installed. I'm having issues with copying the data however. Neither pg_dump and the copy command are able to copy the data over. I receive the following error: wdcindex=> COPY clients TO '/home/craig/clients' USING DELIMITERS ','; ERROR: COPY command, running in backend with effective uid 40, could not open file '/home/craig/clients' for writing. Errno = Permission denied (13). wdcindex=> /home/craig is that user's directory. Can anyone think of what my problem is here? Or perhaps recommend a program I could use to extract the data via an odbc connection like SQL Server's import data utility? (don't have SQL Server where I am currently) Since this is postgresql 6.5, PGAdmin II won't connect to it. PHPPGAdmin is install on that server but is having similar problems exporting the data. Any help would be greatly appreciated. Even just exporting the schema would be helpful. Thanks, Craig S.
On Wed, 30 Oct 2002, Craig Sturman wrote: > Hello all, > > I've currently got a couple of pg databases (6.5) at work on a RedHat box > that I'm looking to consolidate and move to a server with 7.2 installed. > I'm having issues with copying the data however. Neither pg_dump and the > copy command are able to copy the data over. I receive the following error: > > wdcindex=> COPY clients TO '/home/craig/clients' USING DELIMITERS ','; > ERROR: COPY command, running in backend with effective uid 40, could not > open file '/home/craig/clients' for writing. Errno = Permission denied > (13). > wdcindex=> This error is because the file permissions will not allow opening of it. Try and use chmod command to give appropriate rwx to the file this will solve that problem HTH > > /home/craig is that user's directory. Can anyone think of what my problem > is here? Or perhaps recommend a program I could use to extract the data via > an odbc connection like SQL Server's import data utility? (don't have SQL > Server where I am currently) Since this is postgresql 6.5, PGAdmin II won't > connect to it. PHPPGAdmin is install on that server but is having similar > problems exporting the data. > > Any help would be greatly appreciated. Even just exporting the schema would > be helpful. > > Thanks, > > Craig S. > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Darren Ferguson
On Wed, 30 Oct 2002, Darren Ferguson wrote: > On Wed, 30 Oct 2002, Craig Sturman wrote: > > > Hello all, > > > > I've currently got a couple of pg databases (6.5) at work on a RedHat box > > that I'm looking to consolidate and move to a server with 7.2 installed. > > I'm having issues with copying the data however. Neither pg_dump and the > > copy command are able to copy the data over. I receive the following error: > > > > wdcindex=> COPY clients TO '/home/craig/clients' USING DELIMITERS ','; > > ERROR: COPY command, running in backend with effective uid 40, could not > > open file '/home/craig/clients' for writing. Errno = Permission denied > > (13). > > wdcindex=> > This error is because the file permissions will not allow opening of it. > > Try and use chmod command to give appropriate rwx to the file this will > solve that problem More specifically, you're asking the backend to write a file to that directory, so the user that is running the server needs access not the user running the client. You might also want to see if \copy works instead. BTW: what does pg_dump give you as an error?