Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Okay, I apologize if this is so basic that I should know the answer, but I'm not sure where else to go for the solution.

I would like to start a small store site using Volusion. I would like some custom ASP code to query data that I currently have in a Postgres database. I would like to be able to just move the database file(s) onto the Volusion server via ftp and access them from my store site (via the custom ASP).

Do I need to install Postgres onto the server to do this, or can I just ftp my database file(s) and access them with the ASP code? I think I need to install Postgres, but would like to do this without such an installation if possible.

share|improve this question
1  
If anything, this would be a developer question and belongs on Stack Overflow. –  SvW Apr 6 '12 at 20:07
    
Not sure why you down voted my question - it has to do with how to use Postgres data on a server. I've seen similar questions on Stack Overflow (no need for the link, I'm a member there) directed to this forum. –  Sean Apr 6 '12 at 21:10
    
Who said I downvoted the question? –  SvW Apr 6 '12 at 21:12
add comment

1 Answer

up vote 2 down vote accepted

If you just want to copy across your Postgres data directory (usually in /var/lib/pgsql on Unix systems), then you'll need to install PostgreSQL (make sure it's the same version as the one that created the files) to read their data. PostgreSQL stores its data internally in a highly optimized format that only it understands, so there's no way you'd want to write a driver for that in ASP; you'd just end up re-writing Postgres.

A better solution for migrating data would be to use the pg_dump utility to generate an SQL file containing your entire database on the old server (and compress it, for the love of pete--those dumps are huge), and then apply it to a fresh install of any version of Postgres on the new server. If you really wanted to avoid installing Postgres you could probably parse the raw SQL output from pg_dump using ASP. I'd not recommend it, though; there are all sorts of problems that a robust database system like Postgres handles silently for you (like concurrency) that some hand-written accessor would almost certainly be unable to handle.

And SvenW is right, this probably belongs on Stack Overflow.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.