成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

數(shù)據(jù)庫(kù)備份方案 對(duì)象存儲(chǔ) US3

ernest.wang / 2980人閱讀

摘要:本文介紹了如何基于完成數(shù)據(jù)庫(kù)備份。應(yīng)用場(chǎng)景應(yīng)用場(chǎng)景應(yīng)用場(chǎng)景目前數(shù)據(jù)庫(kù)備份場(chǎng)景主要有以下三類備份與恢復(fù)備份方式推薦使用備份到中。

數(shù)據(jù)庫(kù)備份方案

本篇目錄

背景應(yīng)用場(chǎng)景方案優(yōu)勢(shì)方案實(shí)施

背景

對(duì)象存儲(chǔ)作為海量非結(jié)構(gòu)化數(shù)據(jù)的云存儲(chǔ)應(yīng)用,面對(duì)日益上漲的數(shù)據(jù)庫(kù)備份場(chǎng)景,可以有效幫助用戶縮減備份流程,降低備份成本,有效提升用戶體驗(yàn)。 本文介紹了如何基于 US3 完成數(shù)據(jù)庫(kù)備份。

應(yīng)用場(chǎng)景

目前 US3 數(shù)據(jù)庫(kù)備份場(chǎng)景主要有以下三類:

備份與恢復(fù):備份方式推薦使用 Filemgr 備份到 US3 中。 Filemgr 支持本地備份恢復(fù)與流式備份恢復(fù),通過(guò)流式功能可以幫助用戶完成數(shù)據(jù)不落地備份與恢復(fù)。

分級(jí)存儲(chǔ):針對(duì)需要定時(shí)清理備份、縮減備份成本的用戶,US3 支持生命周期功能。 通過(guò)控制臺(tái)指定生命周期規(guī)則,可以幫助用戶完成:1、定期清理;2、定期轉(zhuǎn)入低頻;3、定期轉(zhuǎn)入歸檔;

異地備份:針對(duì)需要更高安全級(jí)別的用戶,US3 支持跨區(qū)域復(fù)制功能。 通過(guò)控制臺(tái)配置跨區(qū)域復(fù)制功能,可以幫助用戶在上傳備份的同時(shí),完成數(shù)據(jù)的異地備份。

image

方案優(yōu)勢(shì)

使用 Filemgr 進(jìn)行流式備份以及流式恢復(fù),完成不落地備份與恢復(fù),可以避免落盤操作。

使用 US3 生命周期 功能,配合定期刪除、低頻存儲(chǔ)、歸檔存儲(chǔ)可以實(shí)現(xiàn)數(shù)據(jù)分級(jí)存儲(chǔ),幫助用戶節(jié)約存儲(chǔ)成本。

使用 US3 跨區(qū)域復(fù)制,為備份數(shù)據(jù)進(jìn)行異地容災(zāi),提高備份數(shù)據(jù)安全性。

方案實(shí)施

使用Filemgr進(jìn)行流式備份,流式恢復(fù)

下載 Filemgr,遷移工具

在 Filemgr 目錄下配置 config.cfg,proxy host 域名請(qǐng)參照 地域和域名

{
    "public_key" : "paste your public key here",
    "private_key" : "paste your private key here",
    "proxy_host" : "www.cn-bj.ufileos.com",       // proxy host請(qǐng)?zhí)顚憣?duì)應(yīng)地域域名
    "api_host" : "api.spark.ucloud.cn"
}
使用 Filemgr 進(jìn)行備份恢復(fù),此處展示最簡(jiǎn)命令,其他備份命令請(qǐng)結(jié)合自己業(yè)務(wù)類比實(shí)現(xiàn)
bash
# 注意如果,欲使用低頻存儲(chǔ)(IA)或者冷存儲(chǔ)(ARCHIVE),請(qǐng)?jiān)诿顓?shù)storageclass中指定,支持三種值:STANDARD, IA, ARCHIVE
# 注意如果,備份時(shí)指定了storageclass參數(shù)為ARCHIVE,需要提前對(duì)該文件restore
./filemgr-linux64 --action restore --bucket <bucketName> --key <backupKey>
# 邏輯備份
    # 全庫(kù)備份
    mysqldump -A | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <all-backupKey> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class>
    # 分庫(kù)備份
    mysqldump -B database1 database2 | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <part-backupKey> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class>
# 邏輯備份恢復(fù)
    # 全庫(kù)備份恢復(fù)
    ./filemgr-linux --action stream-download --bucket <bucketName> --key <all-backupKey> --threads <threads> --retrycount <retry> 2>./error.log | mysql
    # 分庫(kù)備份恢復(fù)
    ./filemgr-linux --action stream-download --bucket <bucketName> --key <part-backupKey> --threads <threads> --retrycount <retry> 2>./error.log | mysql
# ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# xtrabackup物理備份
    # 全量備份
    innobackupex --stream=tar | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <full-backupKey> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class>
    # 增量備份
    innobackupex --stream=tar --extra-lsndir=/data/backup/chkpoint /data/backup/tmp/ | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <incre-backupKey-base> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class> # 全備
    innobackupex --stream=xbstream --incremental --extra-lsndir=/data/backup/chkpoint --incremental-basedir=/data/backup/chkpoint /data/backup/tmp/ | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <incre-backupKey-incre> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class> # 增備
# xtrabackup物理備份恢復(fù), 需要提前轉(zhuǎn)移原來(lái)的DB數(shù)據(jù), 備份恢復(fù)后需要重啟服務(wù)
    # 全量備份恢復(fù)
        # full-backupKey為全量備份使用的key:
        ./filemgr-linux --action stream-download --bucket <bucketName> --key <full-backupKey> --threads <threads> --retrycount <retry> 2>./error.log | tar xf - -C /data/backup/full/
        innobackupex --apply-log /data/backup/full/
        innobackupex --copy-back --rsync /data/backup/full/
    # 增量備份恢復(fù)
        # full-backupKey為全量備份使用的key,incre-backupKey為增量備份使用的key:
        ./filemgr-linux --action stream-download --bucket <bucketName> --key <incre-backupKey-base> --threads <threads> --retrycount <retry> 2>./error.log | tar xf - -C /data/backup/base/
        innobackupex --apply-log --redo-only /data/backup/base/
        ./filemgr-linux --action stream-download --bucket <bucketName> --key <incre-backupKey-incre> --threads <threads> --retrycount <retry> 2>./error.log | xbstream -x -C /data/backup/incre
        innobackupex --apply-log /data/backup/base --incremental-dir=/data/backup/incre
        innobackupex --copy-back --rsync /data/backup/base
# lvm snapshot物理備份恢復(fù)
    # 備份,/snap-lvm0為備份lv 掛載點(diǎn),/data-lvm0為源lv掛載點(diǎn)
    tar czf - /snap-lvm0/* | ./filemgr-linux64  --action stream-upload --bucket <bucketName> --key <lvmsnap-backupKey> --file stdin
    # 恢復(fù),本地?cái)?shù)據(jù)被清空,--strip-components 用來(lái)去除壓縮快照時(shí)產(chǎn)生的第一層目錄
    ./filemgr-linux64 --action stream-download --bucket <bucketName> --key <lvmsnap-backupKey> 2>./error.log | tar xzf - -C /data-lvm0/ --strip-components 1
    # 合并歷史快照, /snap-lvm0為快照l(shuí)v掛載點(diǎn)
    ./filemgr-linux64 --action stream-download --bucket <bucketName> --key <lvmsnap-backupKey> 2>./error.log | tar xzf - -C /snap-lvm0/ --strip-components 1
    lvconvert --merge <vg>/<snap-lv>
針對(duì)有特殊需求的用戶,這邊提供了相應(yīng)的邏輯備份命令,其他備份命令請(qǐng)類比實(shí)現(xiàn):
# 壓縮
    # 備份
    mysqldump -A | gzip | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <all-backupKey> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class>
    # 恢復(fù)
    ./filemgr-linux --action stream-download --bucket <bucketName> --key <all-backupKey> --threads <threads> --retrycount <retry> 2>./error.log | gzip -d | mysql
# 加密
    # 備份,使用aes256,指定密碼文件key file在備份路徑中進(jìn)行壓縮
    mysqldump -A | openssl enc -e -aes256 -in - -out - -kfile <key file> | ./filemgr-linux64 --action stream-upload --bucket <bucketName> --key <all-backupKey> --file stdin --threads <threads> --retrycount <retry> --storageclass <storage-class>
    # 恢復(fù)
    ./filemgr-linux --action stream-download --bucket <bucketName> --key <all-backupKey> --threads <threads> --retrycount <retry> 2>./error.log | openssl enc -d -aes256 -in - -out - -kfile <key file> | mysql

備注: 如果不希望異常情況終止任務(wù),請(qǐng)將 retrycount 參數(shù)設(shè)置為一個(gè)比較大的值,默認(rèn)為 10。每次執(zhí)行失敗會(huì)開(kāi)始重試,第 5 次重試開(kāi)始每次重試會(huì)等待 5s,請(qǐng)合理計(jì)算重試次數(shù)。

使用生命周期實(shí)現(xiàn)定期刪除打開(kāi)對(duì)象存儲(chǔ)控制臺(tái),進(jìn)入備份使用的 bucket 詳情頁(yè)

image

點(diǎn)擊生命周期 tab,進(jìn)入生命周期配置頁(yè)

image

為該 bucket 配置定期刪除任務(wù)

當(dāng)備份文件超過(guò)配置期限,文件會(huì)被自動(dòng)刪除

使用跨區(qū)域復(fù)制進(jìn)行異地容災(zāi)打開(kāi)對(duì)象存儲(chǔ)控制臺(tái),進(jìn)入備份使用的 bucket 詳情頁(yè)

image

點(diǎn)擊開(kāi)區(qū)域復(fù)制 tab,進(jìn)入跨區(qū)域復(fù)制配置頁(yè)

image

為該 bucket 配置跨區(qū)域復(fù)制任務(wù)

當(dāng)該 bucket 下產(chǎn)生備份文件時(shí),文件會(huì)被自動(dòng)同步到配置好的異地 bucket 中

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/126798.html

相關(guān)文章

  • 概覽 對(duì)象存儲(chǔ) US3

    摘要:概覽概覽產(chǎn)品簡(jiǎn)介產(chǎn)品概述功能概覽產(chǎn)品優(yōu)勢(shì)使用限制存儲(chǔ)類型地域和域名計(jì)量計(jì)費(fèi)產(chǎn)品價(jià)格計(jì)費(fèi)規(guī)則欠費(fèi)處理計(jì)費(fèi)案例快速上手開(kāi)通服務(wù)開(kāi)始使用控制臺(tái)指南存儲(chǔ)空間日志管理文件管理生命周期靜態(tài)網(wǎng)站托管域名管理鏡像回源跨區(qū)域復(fù)制跨域設(shè)置數(shù)據(jù)分析防盜鏈統(tǒng)計(jì)報(bào) 概覽產(chǎn)品簡(jiǎn)介產(chǎn)品概述功能概覽產(chǎn)品優(yōu)勢(shì)使用限制存儲(chǔ)類型地域和域名計(jì)量計(jì)費(fèi)產(chǎn)品價(jià)格計(jì)費(fèi)規(guī)則欠費(fèi)處理計(jì)費(fèi)案例快速上手開(kāi)通 US3 服務(wù)開(kāi)始使用 US3控制臺(tái)指南...

    ernest.wang 評(píng)論0 收藏2651
  • UCloud優(yōu)刻得推出自研存儲(chǔ)引擎US3 持續(xù)降低用戶存儲(chǔ)成本

    摘要:本次大會(huì)上,優(yōu)刻得基于自研的全新存儲(chǔ)底層架構(gòu)推出新一代對(duì)象存儲(chǔ)產(chǎn)品。推出新一代自研存儲(chǔ)引擎,持續(xù)降低存儲(chǔ)成本優(yōu)刻得在今年月推出了元月的歸檔存儲(chǔ)產(chǎn)品,打破了存儲(chǔ)領(lǐng)域降本的邊界。伴隨著5G、大數(shù)據(jù)的廣泛應(yīng)用,帶來(lái)了數(shù)據(jù)量的爆炸式增長(zhǎng)。根據(jù)IDC預(yù)測(cè),2025年全球數(shù)據(jù)總量將達(dá)到驚人的175ZB。數(shù)據(jù)存儲(chǔ)在未來(lái)的數(shù)字化時(shí)代將面臨更多挑戰(zhàn):每秒鐘存儲(chǔ)數(shù)據(jù)寫入性能、數(shù)據(jù)云端存儲(chǔ)可靠性、數(shù)據(jù)存儲(chǔ)成本增高...

    Tecode 評(píng)論0 收藏0
  • 【歸檔存儲(chǔ) UArchive】使用場(chǎng)景、控制臺(tái)快速上手

    摘要:更多歸檔存儲(chǔ)類型的使用說(shuō)明請(qǐng)參考數(shù)據(jù)歸檔方案??刂婆_(tái)快速上手注產(chǎn)品已作為歸檔存儲(chǔ)類型合并至對(duì)象存儲(chǔ),目前不再向新用戶提供獨(dú)立的歸檔存儲(chǔ)服務(wù)。創(chuàng)建歸檔存儲(chǔ)空間登錄控制臺(tái),選擇右側(cè)歸檔存儲(chǔ)后進(jìn)入歸檔存儲(chǔ)列表頁(yè),選擇創(chuàng)建歸檔存儲(chǔ)空間按鈕。使用場(chǎng)景注:UArchive 產(chǎn)品已作為歸檔存儲(chǔ)類型合并至 US3 對(duì)象存儲(chǔ),目前不再向新用戶提供獨(dú)立的歸檔存儲(chǔ)服務(wù)。如需使用更低成本的對(duì)象存儲(chǔ)服務(wù),請(qǐng)至 US3...

    Tecode 評(píng)論0 收藏0
  • 【歸檔存儲(chǔ) UArchive】主要概念、產(chǎn)品優(yōu)勢(shì)

    摘要:歸檔存儲(chǔ)空間英文名稱,是歸檔文件的組織單位,相當(dāng)于目錄的作用,也是計(jì)費(fèi)權(quán)限控制等功能的管理單位。歸檔文件英文名稱,是數(shù)據(jù)操作的基本單元,支持任意數(shù)據(jù)類型。主要概念注:UArchive 產(chǎn)品已作為歸檔存儲(chǔ)類型合并至 US3 對(duì)象存儲(chǔ),目前不再向新用戶提供獨(dú)立的歸檔存儲(chǔ)服務(wù)。如需使用更低成本的對(duì)象存儲(chǔ)服務(wù),請(qǐng)至 US3 對(duì)象存儲(chǔ)控制臺(tái) 。更多 US3 歸檔存儲(chǔ)類型的使用說(shuō)明請(qǐng)參考 數(shù)據(jù)歸檔方案。...

    Tecode 評(píng)論0 收藏0
  • 打通本地部署和公有云,混合云架構(gòu)讓“魚”和“熊掌”兼得(一)

    摘要:對(duì)于上述問(wèn)題,混合云架構(gòu)無(wú)疑是企業(yè)的最佳選擇。解決方案將本地環(huán)境與公有云連通組成混合云架構(gòu),實(shí)現(xiàn)對(duì)本地環(huán)境計(jì)算能力的快速擴(kuò)展。前言當(dāng)前各行各業(yè)在積極擁抱云計(jì)算,但由于一些歷史原因和合規(guī)要求導(dǎo)致很多企業(yè)全面上云比較困難,比如企業(yè)監(jiān)管制度及合規(guī)要求一些核心數(shù)據(jù)庫(kù)必須保留在本地?cái)?shù)據(jù)中心;本地?cái)?shù)據(jù)中心作為企業(yè)固定資產(chǎn)不容易完全拋棄;有些大型集團(tuán)企業(yè)IT架構(gòu)復(fù)雜,全面遷移上云的影響難以評(píng)估等等。因此,...

    Tecode 評(píng)論0 收藏0
  • 打通本地部署和公有云,混合云架構(gòu)讓“魚”和“熊掌”兼得(一)

    摘要:對(duì)于上述問(wèn)題,混合云架構(gòu)無(wú)疑是企業(yè)的最佳選擇。解決方案將本地環(huán)境與公有云連通組成混合云架構(gòu),實(shí)現(xiàn)對(duì)本地環(huán)境計(jì)算能力的快速擴(kuò)展。前言當(dāng)前各行各業(yè)在積極擁抱云計(jì)算,但由于一些歷史原因和合規(guī)要求導(dǎo)致很多企業(yè)全面上云比較困難,比如企業(yè)監(jiān)管制度及合規(guī)要求一些核心數(shù)據(jù)庫(kù)必須保留在本地?cái)?shù)據(jù)中心;本地?cái)?shù)據(jù)中心作為企業(yè)固定資產(chǎn)不容易完全拋棄;有些大型集團(tuán)企業(yè)IT架構(gòu)復(fù)雜,全面遷移上云的影響難以評(píng)估等等。因此,...

    Tecode 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<