pinkfloyd Posted September 20, 2024 Posted September 20, 2024 cache只有一个盘,已经碰到过一次cache盘挂了。平常因为会把不重要但是经常用的文件放在cache中,比如immich的一些数据库和略缩图什么文件,我会建立在cache盘,一旦cache盘坏了。会导致immich重新扫照片,浪费时间。 如果把cache通过Mover转移到阵列,会导致cache中的文件剪切到阵列,就没有起到缓存的作用。 我试过安装syncthing,希望可以把cache里的文件实时同步(复制)到阵列,不过syncthing好像只能在两个不同的设备中同步文件。(不知道可不可以安装两个syncthing docker来实现,不过我也不想这样做。) 所以我的问题是,有没有什么工具,可以实现把在同一个设备(同一个unraid系统中)里的文件夹同步备份到另一个文件夹,意思就是把cache里的文件同步备份到阵列里 当然可以通过增加一块ssd cache组成radi1来实现cache盘的冗余,只是这里只讨论只有一块ssd的情况。 Quote
Vr2Io Posted September 20, 2024 Posted September 20, 2024 (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 September 20, 2024 by Vr2Io Quote
GavinChan Posted September 28, 2024 Posted September 28, 2024 实时同步有点重。我是自己写个script放到user script, 设置一下定期(每天凌晨、每周等), tar,gz cache的特定目录 到阵列的目录中。 Quote
Recommended Posts
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.