rsync執行時使用硬碟安全嗎?

如果您是第一次開始使用rsync,並且有多個大型硬碟驅動器要備份,那麼在這個漫長的過程中使用一個或多個硬碟驅動器是否安全?今天的超級使用者問答帖子回答了一位憂心忡忡的讀者的問題。...

rsync執行時使用硬碟安全嗎?

如果您是第一次開始使用rsync,並且有多個大型硬碟驅動器要備份,那麼在這個漫長的過程中使用一個或多個硬碟驅動器是否安全?今天的超級使用者問答帖子回答了一位憂心忡忡的讀者的問題。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者都想知道在rsync執行時使用硬碟是否安全:

I plan to backup my collection of large hard drives using rsync and anticipate that it will take a few days. Is it safe to use the original hard drive (adding files) while rsync is working or it is better to leave the hard drives untouched until rsync is completely finished?

rsync執行時使用硬碟安全嗎?

答案

超級使用者貢獻者Michael Kjorling為我們提供了答案:

As others have already pointed out, it is safe to read from the source disk or use the target disk outside of the target directory while rsync is running. It is also safe to read within the target directory, especially if the target directory is being populated exclusively by the rsync run.

What is not generally safe, however, is to write within the source directory while rsync is running. “Write” is anything that modifies the content of the source directory or any subdirectory thereof, so that includes file updates, deleti***, creation, etc.

Doing so will not actually break anything, but the change may or may not actually get picked up by rsync for copying to the target location. That depends on the type of change, whether rsync has scanned that particular directory yet, and whether rsync has copied the file or directory in question yet.

There is an easy way around that, however. Once rsync has finished, run it again with the same parameters (unless you have some funky deletion parameter; if you do, then be a bit more careful). Doing so will cause rsync to re-scan the source and transfer any differences that were not picked up during the original run.

The second run should transfer only differences that happened during the previous rsync run, and as such, will be completed much faster. Thus, you can feel free to use the computer normally during the first run, but should avoid making any changes as much as possible to the source during the second run. If you can, strongly c***ider remounting the source file system as read-only before starting the second rsync run (something like mount -o ro,remount /media/source should do).


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

圖片來源:Linux截圖(Flickr)

  • 發表於 2021-04-08 07:18
  • 閱讀 ( 43 )
  • 分類:網際網路

你可能感興趣的文章

將資料儲存在freenas盒上的10個原因

...它扔掉?為什麼不給它注入新的活力呢。FreeNAS幾乎可以執行任何東西。當然,你可能無法同時流4K內容到您的整個社群。但如果您想要一個簡單、安全的檔案伺服器和/或備份伺服器。 ...

  • 發佈於 2021-03-14 03:40
  • 閲讀 ( 72 )

linux上應該有5個安全工具

... 沙盒透過限制程式可以在其中執行的操作來幫助保護系統。其中的程式不能影響它之外的任何東西,比如重要的系統檔案。這可以作為應用程式的第二層安全保護,這些應用程式中可能存在漏洞,例如...

  • 發佈於 2021-03-15 01:11
  • 閲讀 ( 38 )

有效清潔電腦的6個清潔技巧

... 在分析和執行清理掃描時,CCleaner會選擇一些要刪除的預設資訊型別。但其中有些不值得定期清洗。例如,瀏覽器快取會隨著時間的推移而積累,並在具有較小硬碟驅動器的系統上...

  • 發佈於 2021-03-15 11:38
  • 閲讀 ( 43 )

使用rsync備份資料(無需桌面)

... 在跳入深端並正確使用rsync之前,最好先進行一次試執行。這樣做可以讓您在備份資料之前準確地看到rsync將複製什麼以及複製到哪裡。您只需在命令中新增-n選項(no changes made的縮寫)即可執行測試執行: ...

  • 發佈於 2021-03-16 12:17
  • 閲讀 ( 49 )

firejail:提高linux安全性的一種簡單方法

... 如果你受到損害的損害已經做了,它真的不重要,你執行的作業系統。Firejail允許您降低這種風險,但它能保證您的安全而不使您的系統無法使用嗎? ...

  • 發佈於 2021-03-17 05:24
  • 閲讀 ( 37 )

windows10宕機黑屏的修復

...,請檢查硬碟驅動器指示燈是否閃爍。安裝程式可能仍在執行,但速度很慢,這可能是由於計算機的老化。在大多數情況下,Windows10應該在幾個小時內安裝完畢。 安裝程式卡住:如果發生這種情況,並且沒有硬碟...

  • 發佈於 2021-03-17 23:44
  • 閲讀 ( 55 )

固態驅動器是如何工作的?

... 快取是最裡面的記憶體單元。執行時,您的計算機將快取用作資料計算和過程的一種遊樂場。到快取記憶體的電子路徑最短,使得資料訪問幾乎是即時的。但是,快取非常小,因此其資料不斷被覆蓋。...

  • 發佈於 2021-03-24 15:51
  • 閲讀 ( 49 )

如何在windows10中修復速度較慢的外部硬碟

... 如果外部硬碟效能下降,可以執行幾個步驟來診斷或修復問題。 ...

  • 發佈於 2021-03-25 23:19
  • 閲讀 ( 56 )

使用rsync自動將檔案備份到遠端伺服器

是否擔心丟失資料,或者厭倦了每天或每週執行手動備份?使用rsync命令,無需手動干預即可根據需要將本地檔案自動同步到遠端伺服器。請注意,本指南確實需要訪問遠端Linux伺服器(如AWS),並且是在Ubuntu20.04下編寫的,儘管...

  • 發佈於 2021-03-28 09:36
  • 閲讀 ( 54 )

linux上最好的7個無線檔案傳輸應用程式

...理想應用程式。如名稱所示,LAN Share透過本地internet連線執行,兩個裝置都必須安裝並執行LAN Share才能使用它。 ...

  • 發佈於 2021-03-29 09:23
  • 閲讀 ( 57 )
ZackTea
ZackTea

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦