前提・実現したいこと
rsyncコマンドでフォルダのサーバ間で同期をとりたい
同期をとった後はコピーしたファイルを削除したい
試したこと
/usr/bin/rsync -avu --remove-source-files -e "ssh -i /home/rsyncuser/.ssh/synckey.pem -p 11111" --rsync-path='sudo rsync' rsyncuser@X.X.X.X:/data/syncfolder/ /data/syncfolder//
上記のコマンドのを同期先から発行しましたが
--remove-source-filesのオプションがないと表示されてコマンドが効かない状態です。
同期元のバージョンがversion 2.6.8のためオプションがないものと思われます。
(同期元のManをみましたがオプションがありません。)
補足情報(FW/ツールのバージョンなど)
同期元
[root@]# rsync --version rsync version 2.6.8 protocol version 29 Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others. <http://rsync.samba.org/> Capabilities: 64-bit files, socketpairs, hard links, ACLs, xattrs, symlinks, batchfiles, inplace, IPv6, 64-bit system inums, 64-bit internal inums rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.
同期先
[root@]# rsync --version rsync version 3.0.6 protocol version 30 Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace, append, ACLs, xattrs, iconv, symtimes rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.
質問事項
同期元のRsyncをUpdeteできないため--remove-source-filesにかわるオプションがあればいいのかなと思っていますが
何か--remove-source-filesと同等のことができるオプションはありますでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。