Jump to content

如何同步cache文件到阵列?


Recommended Posts

Posted

cache只有一个盘,已经碰到过一次cache盘挂了。平常因为会把不重要但是经常用的文件放在cache中,比如immich的一些数据库和略缩图什么文件,我会建立在cache盘,一旦cache盘坏了。会导致immich重新扫照片,浪费时间。

 

如果把cache通过Mover转移到阵列,会导致cache中的文件剪切到阵列,就没有起到缓存的作用。

 

我试过安装syncthing,希望可以把cache里的文件实时同步(复制)到阵列,不过syncthing好像只能在两个不同的设备中同步文件。(不知道可不可以安装两个syncthing docker来实现,不过我也不想这样做。)

 

所以我的问题是,有没有什么工具,可以实现把在同一个设备(同一个unraid系统中)里的文件夹同步备份到另一个文件夹,意思就是把cache里的文件同步备份到阵列里

 

当然可以通过增加一块ssd cache组成radi1来实现cache盘的冗余,只是这里只讨论只有一块ssd的情况。

Posted (edited)

直接用 command 就可, rsync. 網絡上很多用法資料. 十分好用又強大. 最後加入 -n 就是模擬一下先, 這可避免做錯事.

 

如不想每次輸入 command, 安裝 user script 來執行便可.

 

例如以下, 意思是傳送了 162MB, 更新了 1751 個檔案.

 

Number of files: 69,787 (reg: 69,778, dir: 9)
Number of created files: 1,751 (reg: 1,751)
Number of deleted files: 0
Number of regular files transferred: 1,751
Total file size: 6.43G bytes
Total transferred file size: 162.17M bytes
Literal data: 162.17M bytes
Matched data: 0 bytes
File list size: 3.80M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 166.17M
Total bytes received: 33.35K

Edited by Vr2Io

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...