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

Time:10-12

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?

CodePudding user response:

What you want to do with git is not possible because changes to the database is not versioned.

The command to run bash on Heroku is heroku run bash, not heroku bash run. You may have to specify the app using the -a flag: https://devcenter.heroku.com/articles/heroku-cli-commands#heroku-run

CodePudding user response:

I have solve 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