用 Google Drive 嚟 Backup 啲 GCE Linux Instance 檔案

GCE (Google Compute Engine) Linux Instance 支持 SSH,不過如果想用佢嚟 backup 少少 files 都算幾麻煩㗎,要搞 SSH Security Key,我比較懶,於是上網搵下有冇容易啲嘅辦法,俾我喺 GitHub 搵到一個叫 gdrive 嘅 open sources 軟件(哩度仲有人講添),可以用 bash command line 嚟抄啲檔案上 Google Drive,用喺我啲 GCE Linux instances 剛剛好,正!👻

 
首先去你個 Google Cloud Console 打開你隻 instance 嘅 console,選 Open in browser window 就啱,😋  順利打開
去 gdrive 個 GitHub 網搵出你啱用嘅版本,right click 然後 copy 條 link。 下載 gdrive
 
改名做 gdrive,同埋改為 executable。噢,個名唔使一定叫做 gdrive,你可以改做其他的名字,不過無謂吖,自找麻煩。😡
最後就係 install 佢,方便使用。
接住落嚟係 Connect 你個 Google Drive,drive list 原本係顯示你個 Google Drive 嘅 root directory 嘅資料,由於你未 Connect,佢會出條 link 指示你去攞個叫 Verification code。
抄條 link 出嚟  Paste 落去你個 Chrome browser,如果你有超過一個 Gmail account 佢會問你想 Connect 邊個 account?
選好,佢繼續問你係咪准佢 Connect? 准嘅話,佢會出條 Verification code 俾你,抄佢。
Paste 落去,佢會 connect 同時繼續 list 個 root directory。 上傳第一個檔案,完成之後會顯示隻檔案嘅 unique ID。
Google Drive web console 會有 試下 upload 去你指定嘅 folder,先 search 下有咩檔案/檔案夾係叫 nxStudio,抄低個 ID。
搞掂! 睇下有冇,😎
將成個 directory 抄上去 Google Drive 嘅 folder iis-2-nginx 度。 佢會 喺 under iis-2-nginx 之下 create 一個同名嘅 folder。
裡面有哂你嘅上傳檔案!

*** 完 ***