Gih's Blog

只言片语
Archive for April 2015

backup/export database from heroku

2015-04-27 by gihnius, tagged as database

escape from heroku

app="gallery"

backup db of app

heroku pgbackups:capture -a $app-staging
heroku pgbackups:capture -a $app-demo
heroku pgbackups:capture -a $app-production

download

curl -o staging.dump `heroku pgbackups:url -a $app-staging`
curl -o demo.dump `heroku pgbackups:url -a $app-demo`
curl -o prod.dump `heroku pgbackups:url -a $app-production`

upload to ec2

scp *.dump admin@EC2IP:

import db

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U rails -d $app_dev staging.dump
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U rails -d $app_demo demo.dump
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U rails -d $app_production prod.dump

refer

https://devcenter.heroku.com/articles/pgbackups

整理了一下博客

2015-04-06 by gihnius, tagged as internet
今天更新了式样, 添加了 Disqus 评论系统, 欢迎评论. 链接也采用标题描述取代原来的日期方式.

关闭 padory.com

2015-04-02 by gihnius, tagged as web

https://www.padory.com/ 是一个用 Go 语言写的知识分享的社区网站, 运行已经有大半年, 今天把它给关了,因为我完全不懂也没有足够的时间去好好运营一个社区网站. 就像博客一样, 也是当年 (2011) 一时心血来潮搭起来的. 当时自己并没有想过怎样去写好博客, 就拿一些技术记录来充数, 到现在也一样, 只不过都运行这么几年了, 关闭了有点可惜.

睡觉了...明天回去过清明呢.