備份云服務(wù)器的Couchbase數(shù)據(jù)庫可以通過兩種方式進(jìn)行:使用cbbackup命令行工具或通過Couchbase Web管理界面。
使用cbbackup命令行工具備份數(shù)據(jù)庫:
運(yùn)行以下命令備份數(shù)據(jù)庫:cbbackup http://localhost:8091 /path/to/backup/Directory -u username -p password
這將在指定的備份目錄中創(chuàng)建一個(gè)備份文件。
使用Couchbase Web管理界面?zhèn)浞?a href="http://www.wanjiajiazheng.cn/help/index.php/tag/10" title="數(shù)據(jù)庫flickr.photos.notes.edit target="_blank">數(shù)據(jù)庫:
登錄到Couchbase Web管理界面。
在左側(cè)導(dǎo)航欄中選擇“數(shù)據(jù)”。
點(diǎn)擊“導(dǎo)出”按鈕并選擇要備份的桶。
點(diǎn)擊“導(dǎo)出桶”并選擇備份的文件類型和位置。
恢復(fù)Couchbase數(shù)據(jù)庫可以通過兩種方式進(jìn)行:使用cbrestore命令行工具或通過Couchbase Web管理界面。
使用cbrestore命令行工具恢復(fù)數(shù)據(jù)庫:
運(yùn)行以下命令恢復(fù)數(shù)據(jù)庫:cbrestore /path/to/backup/Directory http://localhost:8091 -u username -p password
這將從備份文件中恢復(fù)數(shù)據(jù)庫。
使用Couchbase Web管理界面恢復(fù)數(shù)據(jù)庫:
登錄到Couchbase Web管理界面。
在左側(cè)導(dǎo)航欄中選擇“數(shù)據(jù)”。
點(diǎn)擊“導(dǎo)入”按鈕并選擇要恢復(fù)的桶。
選擇備份文件并點(diǎn)擊“導(dǎo)入桶”。
請(qǐng)注意,在備份和恢復(fù)數(shù)據(jù)庫之前,請(qǐng)確保已經(jīng)仔細(xì)閱讀了Couchbase官方文檔,并了解相關(guān)操作的風(fēng)險(xiǎn)和影響。