Skip to content

Comment on Yipit Django Blog: Sharing Everything We’re Learningparent

Comments

Restoring is another 6 lines of bash:

    s3cmd --config ~/.s3cfg get s3://BUCKET/database_$1.sql.gz
    gunzip database_$1.sql.gz
    sudo -u postgres dropdb DBNAME
    sudo -u postgres createdb -O DBUSER DBNAME
    sudo -u postgres psql DBNAME < database_$1.sql
    rm database_$1.sql
But I suppose being database agnostic would be handy - it would make switching from mysql to postgres easier.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.