Azure 儲存體Backup === ## Azure DB Backup - https://learn.microsoft.com/zh-tw/azure/azure-sql/database/automated-backups-overview?view=azuresql - https://learn.microsoft.com/zh-tw/azure/azure-sql/database/automated-backups-change-settings?view=azuresql&tabs=azure-portal - https://azure.microsoft.com/en-us/pricing/details/azure-sql-database/single/ ## Azure VM Backup - https://learn.microsoft.com/zh-tw/azure/backup/quick-backup-vm-portal - https://learn.microsoft.com/zh-tw/azure/backup/backup-azure-vms-introduction ## Azure Storage Backup - https://learn.microsoft.com/en-us/azure/backup/blob-backup-overview - https://learn.microsoft.com/en-us/azure/storage/common/redundancy-migration?tabs=portal GCP 資料備份 === https://hackmd.io/KUpCfCkoTyCW7-Ri2HoAeg ## GCS 大多數 GCP 上面的資源都可以挑選佈署的 locaiton,參考下圖邏輯  according to [DOC](https://cloud.google.com/storage/docs/locations#key-concepts),bucket 一旦建立就無法調整區域,只能建立新的再搬過去 ### Backup and Recovery > disaster recovery 一般性參考指南 https://cloud.google.com/docs/geography-and-regions#application_deployment_considerations #### 常見方案 * schedule 將資料複製到其他區域即可 (cloud transfer, gsutil, client library),然後用 Nearline or Coldline 等級存放  * 也支援 hybrid 方式  API, client SDK, cli tools 皆可,或是使用 GCP dta transfer 服務 (有 $$ 好辦事) #### retention policy 避免檔案被誤刪 ## VM disk ### DR GCP 有一套 "Backup and DR" 的 SaaS,只要把[權限\網路 ... 等](https://cloud.google.com/backup-disaster-recovery/docs/configuration/deployment-plan),都先設定好。就能直接使用 :::success 該服務支援 VM\DB\file system 之災難備援,先啟用該 SaaS 並完成相關設定。針對需要備份之服務,預先建立好 backup plan: * Templates * Type of operation (snapshot, replication ...) * Frequency of the operation * How long to retain the captured data * Whether to truncate logs. (the modifications made to the databases * Where the captured data is retained * Profiles * control the physical location and storage pools where data is stored ::: 附上 VM 的 DR [設定細節](https://cloud.google.com/backup-disaster-recovery/docs/quickstarts/gce-instances-backup-recovery),更多說明等開通實際試用後才能介紹 ... ### 手動備份 * clone disk * create snapshot ## Cloud SQL ### Backup and Recovery 內建有預設自動 multi-region backup,可以自己選地區  如果要保留完整的 transaction log,建議多加 1-2 天的備份週期 * On-demand backups 不會自動刪除 * Automated backups 會被定期排程清除 也可以手動進行備份 ## Cloud SQL ### Default Backup and Recovery 內建有預設自動 multi-region backup,可以自己選地區  如果要保留完整的 transaction log,建議多加 1-2 天的備份週期 * On-demand backups 不會自動刪除 * Automated backups 會被定期排程清除 也可以手動進行備份 ### 手動方案 #### Export & import 支援更進階(下 query)的資料匯出\入 (to GCS) https://cloud.google.com/sql/docs/mysql/import-export 不包含 server log,只有 query result data :::warning 以上方法皆不可用於 sql server update,需要使用專門的 migration tool ::: ### Cascading read replicas (DR) #### backup 如果需要 DR,replica 最好在不同區域。  視情況決定是否要在恢復過後,重新將 primary 切回 A 區 1. 故障發生在 R1  2. 故障移轉,切換到 R2  * client connection 需要 re-config * promoted primary 多生出一台 stand-by 3. new replica 被建立 > 整套 try 一遍 https://cloud.google.com/solutions/cloud-sql-mysql-disaster-recovery-complete-failover-fallback #### restore * 會覆蓋資料 * 所有 connection 會中斷 * 完成後 instance 會重啟 * ==replica 需要全部砍掉重建== > 跨 project 也 OK
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up