1
esee 3 天前
不太理解你的需求,你的意思是 A 中 a 文件先同步到 B 的 a ,如果后面 A 中 a 修改了,也不必同步 到 B 的 a 中,这时候两边的 a 就不同了,是这样吗?
|
![]() |
2
noqwerty 3 天前 via iPhone
可以看看 rclone ,印象里有不同的增量同步比较方式
|
3
ntedshen 3 天前
你是否在找
--ignore-existing ? |
![]() |
4
xinmans OP @ntedshen
--ignore-existing:要求只更新目标端不存在的文件。和"--existing"结合使用有特殊功能,见下文示例。 主要是我的目录 B 需要定期删除已经同步的文件,但是 A 目录要保持全量。这个满足不了我的需求。 |
![]() |
5
xinmans OP A 中的文件会不断新增新文件,我只需要把新增的新文件同步到 B 目录,已经同步过的不要同步到 B 目录,我会有一个程序处理 B 目录,会把处理过的文件删除掉。我希望有一个只同步新增文件的过程,且 B 目录的老文件会定期清理掉(因为空间不够)
|
![]() |
6
xinmans OP @noqwerty ,谢谢,好像是可以满足我的需求,i will try
For example, if you have many files in /path/to/src but only a few of them change every day, you can copy all the files which have changed recently very efficiently like this: rclone copy --max-age 24h --no-traverse /path/to/src remote: Rclone will sync the modification times of files and directories if the backend supports it. If metadata syncing is required then use the --metadata flag. Note that the modification time and metadata for the root directory will not be synced. See https://github.com/rclone/rclone/issues/7652 for more info. |