From heroku server unable to take backup

Total Post:27

 977  View(s)
Rate this:

I am unable to take backup of sqlite3 file from heroku server and gettin an error, here is the command I use: command heroku db:pull sqlite:///Users/sample/backup.db.
this is the error:

!    `db:pull` is not a heroku command.
!    Perhaps you meant `pg:pull`.
!    See `heroku help` for a list of available commands.

It seems db command isn't available anymore and I couldn't find a way to backup the sqlite database from heroku.
Please help me how can I take backup?

  1. Post:214

    Re: From heroku server unable to take backup

    To backup your database from heroku and download the backup, follow the following steps:
    create a backup:
    heroku pg:backups capture --app your_app_name
    create a publicly accessible backup URL:
    heroku pg:backups public-url --app your_app_name
    Then, curl it down and save it to db_backup.dump file:
    curl 'the_db_backup_url' > db_backup.dump



Enter your email address here always to be updated. We promise not to spam!