在服务器上运行`heroku pgbackups:capture`以执行备份的命令是什么? [英] What command(s) does `heroku pgbackups:capture` run on the server to perform backups?

查看:89
本文介绍了在服务器上运行`heroku pgbackups:capture`以执行备份的命令是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Heroku已迁移到新的数据库层,我发现自己没有使用 pgbackups 插件提供的自动备份计划,因为我只是基本计划。

Since Heroku migrated to their new database tiers, I've found myself without the automated backup plan provided by the pgbackups addon, as I'm only on a basic plan.

使用 cron pgbackups 备份c $ c> addon,如果我知道当我通过工具栏在我的终端上运行 heroku pgbackups:capture --expire 时,在远程端执行了什么命令。

I'd happily run a daily pgbackups backup using the cron addon, if I knew what commands were actually executed on the remote side when I run heroku pgbackups:capture --expire on my end via the toolbelt.

我的应用程序都是使用Cedar堆栈的Python应用程序,所以我不确定其他问题可用于我(其中一些还提到备份到S3,而我想如果可能,请使用本机备份存储机制)。

My applications are all Python apps using the Cedar stack, so I'm not sure that the gem-based auto-backup options mentioned in other questions are available to me (some of those also mention backing up to S3, whereas I'd like to use the native backup storage mechanism if possible).

我只是想运行 heroku pgbackups:capture --expire 来自cron,但Heroku命令不可用le在服务器端。

I'd just like to essentially run heroku pgbackups:capture --expire from cron, but the Heroku commands aren't available on the server side.

任何提示将非常感激。感谢您的阅读。

Any tips would be very much appreciated. Thanks for reading.

推荐答案

$ PGPASSWORD = mypassword pg_dump -Fc --no-acl --no -owner -h myhost -U myuser mydb> mydb.dump

这篇关于在服务器上运行`heroku pgbackups:capture`以执行备份的命令是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆