Thats why I added the -i flag to the pg_dump call as it specifically
addresses this minor issue.  From pg_dump docs:
-i
--ignore-version
    Ignore version mismatch between pg_dump and the database server.
    pg_dump can handle databases from previous releases of PostgreSQL,
but very old versions are not supported anymore (currently prior to
7.0). Use this option if you need to override the version check (and
if pg_dump then fails, don't say you weren't warned).

A minor version mismatch (which it appears you are running into)
shouldn't cause any problems.

Jason

On Aug 6, 9:11 pm, sthapit <stha...@gmail.com> wrote:
> I'm auto backing up my database to S3 using code 
> fromhttp://github.com/jpearl/heroku_backupsbut it's giving me this error:
>
> pg_dump: server version: 8.3.11; pg_dump version: 8.3.7
> pg_dump: proceeding despite version mismatch
>
> Can someone help?  I've pasted the pg_dump code below.
>
> def get_db_settings
>   database_url = ENV['DATABASE_URL']
>   matches = database_url.match(/postgres:\/\/([^:]+):([...@]+)@([^\/]+)\/
> (.+)/)
>   {:username => matches[1], :password => matches[2], :host =>
> matches[3], :db_name => matches[4]}
> end
>
> def pg_dump(filename)
>   settings = get_db_settings
>   ENV['PGPASSWORD'] = settings[:password]
>   `pg_dump -i -h #{settings[:host]} -U #{settings[:username]} -F c
> #{settings[:db_name]} > "tmp/#{filename}.pgdump"`
>   filename
> end

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to