RDS資料庫檔案備份恢複__資料庫

來源:互聯網
上載者:User
前言

前幾天做資料更新的時候,手抖了一下,把資料刪除了。幸好阿里雲有7天的備份,馬上下載了備份檔案,想要備份。參照官方備份恢複解決方案:https://help.aliyun.com/knowledge_detail/41817.html?spm=5176.11065259.1996646101.searchclickresult.569d1aa3t4iUZc。覺得很繁瑣。在想有沒有更加簡單的資料恢複方法。目前使用如下方法簡單易用。 備份恢複

從RDS下載的備份檔案解壓後,會得到.ibd和.frm的檔案。例如user.frm,user.ibd。如果要恢複user表,步驟如下: 在本地建一張與user表欄位一模一樣的表。查看下本地的資料目錄(windows一般就在你mysql安裝目錄的data路徑下),就會有user.frm,user.ibd 執行alter table user discard tablespace,會刪除本地user.ibd檔案 把備份的user.ibd複製到本地user下 執行 alter table user import tablespace 完成。 教訓

千萬別手抖。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.