簡體   English   中英

Python function 到 pg_restore 谷歌雲 SQL 數據庫

[英]Python function to pg_restore a Google Cloud SQL database

每天我都會對本地托管的PostgreSQL數據庫進行pg_dump操作,並將該文件存儲在Google Cloud Storage桶中。 存儲桶中只存儲一個文件,它是最新的pg_dump pg_dumpC 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_dumpC 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM