續  用 restic 備份 (snapshot) 資料

假設一開始的備份來源是 /var/www/html

底下可能有好多個檔案或目錄

我想還原其中一部份的資料

restic --repo /backup/xxx --password-file=/etc/restic/.password restore latest --target /path/cross --include crossdata/wow

就可以將 /backup/xxx 裡的備份,還原到 /path/cross 底下,那我還原出來的資料就只有 /var/www/html/crossdata/wow 這路徑或目錄的而己

與先前提到的 –path 不同是 –path 是要絕對路徑,而 –include 只要下關鍵字即可,就方便許多,不需要整批還原才拿得到資料了。

 

 

 

 

Related posts 相關文章
用 restic 備份 (snapshot) 資料
More...
備份 VSCode 設定
More...
evernote 指令匯出記事本內容,算是備份
More...
架設 GitLab 作 Git 版本控管(四) – 備份還原
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。