Can I download source code which has deployed with github from Heroku?

Viewed 149

I have deployed my django-app on heroku with Github. It is test server so I am using sqlitedb. But because of the dyno manager, my sqlitedb resets everyday. So I am going to download only db on heroku.

I tried this command.

heroku git:clone -a APP-NAME

But this clones empty repository.

And when I run $heroku run bash -a APP-NAME command, I got ETIMEOUT error.

Is there any other way to download the source code on heroku?

2 Answers

I have solved with downloading the application slug.

If you have not used git to deploy your application, or using heroku git:clone has only created an empty repository, you can download the slug that was build when you application was last deployed.

First, install the heroku-slugs CLI plugin with heroku plugins:install heroku-slugs,

then run:

heroku slugs:download -a APP_NAME

This will download and compress your slug into a directory with the same name as your application.

Related