相关疑难解决方法(0)

Heroku将db从一个app转移到另一个app

我需要将db从app_1传输到app_2

我在app_1上创建了备份

然后跑了:

heroku pg:backups还原HEROKU_POSTGRESQL_COLOR --app app_2 heroku pgbackups:url --app app_1

HEROKU_POSTGRESQL_COLOR = app_2的数据库网址

然后我得到:

 !    `pg:backups` is not a heroku command.
 !    Perhaps you meant `pgbackups`.
 !    See `heroku help` for a list of available commands.
Run Code Online (Sandbox Code Playgroud)

所以我跑了:

heroku pgbackups:恢复HEROKU_POSTGRESQL_COLOR --app app_2 heroku pgbackups:url --app app_1

然后我得到以下内容:

!    WARNING: Destructive Action
!    This command will affect the app: app_2
!    To proceed, type "app_2" or re-run this command with --confirm app_2
Run Code Online (Sandbox Code Playgroud)

所以我确认:

> app_2
 !    Please add the pgbackups addon …
Run Code Online (Sandbox Code Playgroud)

postgresql heroku

33
推荐指数
5
解决办法
2万
查看次数

Heroku:从 S3 导入失败

我正在尝试将本地 Postgresql 数据库导入 Heroku,我正在按照以下步骤操作https://devcenter.heroku.com/articles/heroku-postgres-import-export#import-to-heroku-postgres

我已经成功:

  • 创建了一个转储
  • 将其上传到 S3 Bucket
  • 从 AWS CLI 创建一个签名链接
  • 运行命令heroku pg:backups:restore '<SIGNED URL>' DATABASE_URL(添加 -a 与我的应用程序名称)。

恢复备份的过程正确启动,但随后以以下代码退出:

 !    An error occurred and the backup did not finish.
 !
 !    Could not initialize transfer
 !
 !    Run heroku pg:backups:info r011 for more details.
Run Code Online (Sandbox Code Playgroud)

打开日志显示:

Database:         BACKUP
Finished at:      2020-01-09 18:49:30 +0000
Status:           Failed
Type:             Manual
Backup Size:      0.00B (0% compression)

=== Backup Logs
2020-01-09 18:49:30 +0000 Could not initialize transfer
Run Code Online (Sandbox Code Playgroud)

我试过了:

  • 将文件重新上传到存储桶,
  • 生成一个新的签名链接, …

postgresql heroku amazon-s3 amazon-web-services heroku-postgres

5
推荐指数
2
解决办法
623
查看次数