V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
kumiko
V2EX  ›  问与答

初次接触 rsync,请教一个用法

  •  
  •   kumiko · 243 天前 · 414 次点击
    这是一个创建于 243 天前的主题,其中的信息可能已经有所发展或是发生改变。

    刚利用 rsync 备份完一个包含大量图片的文件夹,六百万多的文件数,2T 的容量。 中间遇到一些错误。只举其中一个例子

    rsync -a --delete --info=progress2 /mnt/ssd/hath/data 192.168.1.202::hath
    
    330,049,948,506  99%   65.47MB/s    1:20:07 (xfr#1216569, ir-chk=1305/1219291)
    rsync: [sender] readdir("/mnt/ssd/hath/data/cache/31/1c"): Bad message (74)
    330,437,952,077  99%   65.47MB/s    1:20:13 (xfr#1217874, ir-chk=1751/1221042)
    IO error encountered -- skipping file deletion
    
    1,761,162,491,067 100%   66.33MB/s    7:02:00 (xfr#6475692, to-chk=0/6481954)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
    

    我不知道/mnt/ssd/hath/data/cache/31/1c 这里发生了什么,想单独按照源路径再运行一遍这个命令,对应到模组端 192.168.1.202 下对应的文件夹路径。 可以实现么。现在不敢乱尝试,怕 7 个小时的备份结果灰飞烟灭。

    kumiko
        1
    kumiko  
    OP
       243 天前
    利用 gpt 自己搞定了,意外的和 scp 思路一样
    rsync -av --delete /mnt/ssd/hath/data/cache/31/1c/ 192.168.1.202::hath/data/cache/31/1c/
    后面直接加路径就行了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   821 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:53 · PVG 03:53 · LAX 12:53 · JFK 15:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.