rsync 비밀 실패

rsync 비밀 실패

rsync를 사용하여 로컬 버전과 동일한 원격 디렉터리를 만들려고 하므로 비슷한 작업을 수행했습니다(아래의 "my"를 적절하게 교체).

rsync -avhe 'ssh -p 7822' --progress --delete  \
    /mylocaldir myusername@myremotehost:~/myremotedir`

이 명령의 출력에는 경고가 표시되지만 오류 메시지는 표시되지 않습니다.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_NUMERIC = "c",
    LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
building file list ... 
70 files to consider
Online/index.html
         582 100%    0.00kB/s    0:00:00 (xfer#1, to-check=67/70)

sent 2.28K bytes  received 48 bytes  665.71 bytes/sec
total size is 919.11K  speedup is 394.47

하지만 원격 디렉터리를 확인하면 아무것도 업데이트되지 않습니다. 나는 여러 번 시도했다. 여기서 무슨 일이 일어나고 있는 걸까요? 도움을 주시면 감사하겠습니다.

아래 첫 번째 의견에 대한 답변으로 업데이트하십시오. 이것은 내 /etc/profile 파일의 내용입니다.

# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc
fi

답변1

rsync실행 중이므로 로케일 오류 메시지는 중요하지 않습니다. 대신, 두 개의 디렉토리 정의가 정확히 원하는 것이 아니며 잘못된 위치에서 파일을 찾고 있는 것 같습니다.

당신은 소스 /mylocaldir와 목적지가 있습니다 ~/myremotedir. 이는 ~/myremotedir/mylocaldir파일이 배치될 대상에 생성됩니다.

/mylocaldir콘텐츠를 복사 하려면 ~/myremotedir다음과 같이 소스 디렉터리에 후행을 제공해야 합니다./

rsync -avh -e 'ssh -p 7822' --progress --delete \
    /mylocaldir/ myusername@myremotehost:myremotedir

읽기 쉽도록 명령을 두 줄로 나누었습니다. 작성된 대로 유효한 쉘 구문이지만 \원하는 경우 첫 번째 줄 끝의 문자를 제거하고 함께 연결하십시오.


로케일 설정에 대한 Perl 오류 메시지는 로그인 프로세스의 일부로 실행되는 특정 프로그램에서 나옵니다. , MacOS 앱인 것 같아서 path_helper주석 처리의 중요성에 대해 조언할 수 없거나 /etc/bashrc.

물론 또 다른 옵션은 문제가 있는 응용 프로그램을 식별하는 대신 오류가 더 이상 발생하지 않도록 대상 시스템에 프랑스어 로케일 파일을 설치하는 것입니다.

관련 정보