Nope. There's no real solution to this problem, unfortunately.

The best workaround I could find was to do automated nightly backups to a local 
machine.

CRON
01      6       *       *       *  /path/to/ruby /path/to/backup.rb

BACKUP.RB
#!/path/to/ruby

# Switch to app directory
system `/path/to/bin/for/heroku pgbackups:url --app beekman > 
~/backups/database.url`

# Backup database
system "TIME=~/backups/$(date +'%Y-%m-%d').sql && curl -o $TIME `cat 
~/backups/database.url`"

# Remove temp file
system `rm -rfd ~/backups/database.url`

....

The paths are simplified a bit, but you should be able to figure it out.

Hope that helps!

-- Patrick




On Oct 25, 2012, at 11:20 am, Chris Wise <[email protected]> wrote:

> Patrick,
> 
> Did you ever figure this out? I have the same issue using a similar gem 
> (mesanyachi/backup) and have a version mismatch with the Bamboo stack and the 
> target database on Ivory.
> 
> Chris
> 
> On Thursday, August 16, 2012 2:55:18 PM UTC-4, Patrick Crowley wrote:
> Hey, folks. 
> 
> We just upgraded our Heroku app database from the Shared add-on to the new 
> Heroku Postgres add-on. As you may know, the Shared add-on is being phased 
> out in September... so Heroku is beginning to migrate everyone who's still 
> using it. 
> 
> Since we did this, however, we're unable to back our database up to Amazon 
> S3. (We're using the heroku_s3_backup gem via daily cron to backup.) 
> 
> The heroku_s3_backup gem isn't working because of a version mismatch in the 
> pg_dump tool. The Bamboo stack uses version 8.x of Postgres and the new 
> Heroku Postgres add-on uses version 9.1. 
> 
> Apparently pg_dump is very sensitive to version changes, so it fails when 
> attempting to dump data from a 9.1 database using an 8.x instance of the dump 
> tool. (Reason #2234 I'm not a fan of Postgres). 
> 
> Can you guys recommend any workaround that would allow us to backup our 
> database to S3 which does not require upgrading to the Cedar stack (we can't 
> do that yet, unfortunately) or backing up locally (we want to run this in the 
> cloud from the app itself)? 
> 
> Thanks, 
> Patrick
> 
> -- 
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to