0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

(小ネタ) FATファイルシステム相手にrobocopy/rsyncするときはタイムスタンプに気をつけよう

Posted at

はじめに

FATファイルシステムを使っているパーティションや共有フォルダとデータを同期したい、が
ログを見ると、変更されていないはずのデータまでも転送されてしまっている…。

それはFATのタイムスタンプの精度がよくないからかもしれません。

帯域と時間の無駄なので、変更されていないはずのデータを改めて取得してくるのをやめたい。

こうしよう

その他のオプションについては必要に応じて追加してください

robocopy

C:\> robocopy /MIR /FFT \\server\source X:\dist

/fft FAT ファイル時間 (2 秒の精度) を想定します。

from: Microsoft Docs - robocopy

rsync

$ rsync -a --modify-window=1 /mnt/source /home/user/dist
$ rsync --help
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.

(中略)

     --modify-window=NUM     compare mod-times with reduced accuracy

(後略)

おわりに

根本的な解決策としては「FATを使わない」になってしまいますが、レガシーなシステムではまだ現役です。
もう少し辛抱しましょう…。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?