I am running a heroku command heroku pg:backups:capture --app appname to backup a database, which returns an output in the terminal like this:
Use Ctrl-C at any time to stop monitoring progress; the backup will continue running.
Use heroku pg:backups:info to check progress.
Stop a running backup with heroku pg:backups:cancel.
Starting backup of postgresql-xxxxxxxxxx... done
Backing up DATABASE to b007... done
How can I store the backup name b007 to a variable automatically?