Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Unanswered: Errors on Database Restore

    Hi Guys,

    I'm hoping someone can enlighten me on using pg_restore. I'm trying to get a copy of a database from one of our servers, onto a virtual machine on my development box. I ran pg_dump on the existing server using -Fc (format custom) and rsync'd it over. When I try to restore the database however, on my development VM, I get roughly 1700 errors. Mainly to do with missing indexes, relations and functions. I'm pretty stumped and don't know what to try next. It's like postgres is trying to restore thing in the wrong order, but I have no idea how I'd verify this is the case. Nor can I verify whether or not the indexes, relations, and functions it's complaining about, were exported/dumped in the first place?

    I'll add that the existing server hosting the database is running postgres 8.3.7, while my development box has 8.4.5. Is it possible this minor disparity could cause such a range of errors?

    I'm hoping for some insight from someone with a little more experience than myself.

    Cheers

  2. #2
    Join Date
    Jan 2011
    Posts
    2
    Ok, it seems the vast majority of errors were as a result of not running the SQL scripts that came bundled with PostGIS. More specifically, postgis.sql and spatial_ref_sys.sql. So while PostGIS was installed on the system, Postgres wasn't aware of it.

    The remaining errors (about 500) seem to be caused by things that already exist, which I'm not too concerned about.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •