[英]Python function to pg_restore a Google Cloud SQL database
每天我都會對本地托管的PostgreSQL
數據庫進行pg_dump
操作,並將該文件存儲在Google Cloud Storage
桶中。 存儲桶中只存儲一個文件,它是最新的pg_dump
。 pg_dump
是C Source
文件類型。
I am now looking to write a python
function that can access that pg_dump
file stored in the Google Cloud Storage
bucket and use it to do a pg_restore
on a PostgreSQL
database that lives on a Google Cloud SQL
instance. 這樣做的目的是讓我的本地數據庫基本上備份到Google Cloud SQL
實例。 我什至不知道從哪里開始這個python
function。
每天我都會對本地托管的PostgreSQL
數據庫進行pg_dump
操作,並將該文件存儲在Google Cloud Storage
桶中。 存儲桶中只存儲一個文件,它是最新的pg_dump
。 pg_dump
是C Source
文件類型。
I am now looking to write a python
function that can access that pg_dump
file stored in the Google Cloud Storage
bucket and use it to do a pg_restore
on a PostgreSQL
database that lives on a Google Cloud SQL
instance. 這樣做的目的是讓我的本地數據庫基本上備份到Google Cloud SQL
實例。 我什至不知道從哪里開始這個python
function。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.