开发者

Restarting an interrupted heroku db:pull

开发者 https://www.devze.com 2023-03-17 10:02 出处:网络
I have a decently large DB that I\'m trying to pull down locally from heroku via db:pull. I never can stick around my machine long enough to keep it from going to sleep, e开发者_StackOverflow社区ffe

I have a decently large DB that I'm trying to pull down locally from heroku via db:pull.

I never can stick around my machine long enough to keep it from going to sleep, e开发者_StackOverflow社区ffectively killing the connection and terminating the process. GOTO 1.

I know I could change my system settings to stop my computer from sleeping, which would keep the connection alive, but is there a way to continue a previous pull?

Or maybe the solution is just not to use db:pull for a large db.


heroku db:pull supports resuming. When you start a pull it will create a .dat file in your project (and get rid of it when it's completed). You can do:

 heroku db:pull --resume FILE    # resume transfer described by a .dat file

to start the pull from the previous location.

Heroku pgbackups maybe a better option to grab the large Db file - http://devcenter.heroku.com/articles/pgbackups.

Although I'd be more inclined to prevent your computer from sleeping - just disable the sleep functionality during the downloading from settings/control panel depending on OS.

0

精彩评论

暂无评论...
验证码 换一张
取 消