rsyncと特殊ファイルの関係

rsyncと特殊ファイルの関係

いくつかの既存のバックアップをあるマシンから別のマシンに転送しようとしています。以前のバックアップシステムは、オペレーティングシステムのビルドプロセスの一部として作成されたように見える/dev/hda、/dev/tty0、/dev/nullなどの特殊ファイルを正常にバックアップしたようです。

だから私はrsync彼らのために新しいマシンを設定しようとしましたが、次のような多数のメッセージを受け取り続けました。

別のファイル「machineX/latest/home/machineX/build/image/rh62/dev/agpgart」をスキップ

私が使用するコマンドは次のとおりです。

rsync -avz /oldbackups/machineX/ newbackups:~/machineX/

AFAIK:

-a(アーカイブ)は以下を意味する必要があります-rlptgoD

-D参照すべき--specials --devices

ファイルを確認しました。

$ ls -la machineX/latest/home/machineX/build/image/rh62/dev/agpgart 
crw-rw-r-- 1 500 500 10, 175 Feb  4  2000 machineX/latest/home/machineX/build/image/rh62/dev/agpgart
$ file machineX/latest/home/machineX/build/image/rh62/dev/agpgart
machineX/latest/home/machineX/build/image/rh62/dev/agpgart: character special

それでは、これらはスイッチが上書きしなければならない特別なファイルです--special

なぜまだこのファイルをスキップするのですか?


ちなみに私はrsyncを使用しており、次の詳細があります。

$ rsync --version
rsync  version 3.0.9  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

ベストアンサー1

--specialデバイスが同期するように「家庭」ではなく、間接--devices的に切り替えられます。この目的のために、manページには次のように記載されています。

--devices
       This option causes rsync to transfer character and block  device
       files  to  the  remote  system  to recreate these devices.  This
       option has no effect if the receiving rsync is not  run  as  the
       super-user (see also the --super and --fake-super options).

そして、リモートシステムにrootとしてログインしていないように見え、このオプションは役に立ちません。

おすすめ記事