rsync を使用して 2 つの場所にバックアップする

rsync を使用して 2 つの場所にバックアップする

私の無知をお許しください。答えを探しましたが、今のところ何も見つかりません。

私がやりたいことは次のとおりです:

rsync を使用して、ファイル サーバー (Ubuntu Server 14.04) から NAS デバイスにバックアップします。このバックアップが完了したら、SSH 経由でリモート サーバーに再度 rsync を実行します。

これは適切に動作しないのではないかという不安な気持ちがあります。これは、rsync がファイルを既にバックアップ済みとしてマークし、前回のバックアップ以降変更されていないことに関係しています。

これが問題を引き起こす可能性があると疑うのは正しいでしょうか?

ありがとう、

サイモン。

答え1

man ページから:

DESCRIPTION
   It [rsync] offers a  large  number  of  options
   that  control  every  aspect  of  its behavior and permit very flexible
   specification of the set of files to be copied.  It is famous  for  its
   delta-transfer  algorithm,  which  reduces the amount of data sent over
   the network by sending only the differences between  the  source  files
   and  the  existing  files in the destination.

特別なパラメータなしで、すぐに使えるrsyncでまさにあなたが必要とする:

  • すべての差異をNASに同期するそしてすべての差異をリモート SSH サーバーに同期します。
  • 初めて実行すると、両方に完全なコピーが作成され、その後 2 つが個別に同期されます。

リモート サーバーへの接続が切断された場合でも、次回呼び出されたときには中断したところから続行されます。

関連情報