FROM HEROKU SERVER UNABLE TO TAKE BACKUP

Glen Martin

Total Post:27

Points:191
Posted by  Glen Martin
 630  View(s)
Ratings:
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. Tarun Kumar

    Post:214

    Points:1642
    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

Answer

NEWSLETTER

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