2016-11-17 1 views
0
나는 "VLT"명령 에서 일하고 있어요

덮어 쓰지 않습니다 (파일 볼트 - Jackrabbit FileVault가 AEM VLT Tool에 팔기 전에 포장되어 제공)VLT 도구 ' "VLT 수출"명령

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx-outdoors/activities /Users/temp/data 

위의 명령은 잘 작동하고 수출 "geometrixx-outdoors/activities"의 자산은 입니다. jcr_rootMETA-INF 폴더에 있습니다. 이러한 폴더가 누락 된 경우 명령이 파일을 만들 수도 있습니다.

그러나

같은 다른 소스 (geometrixx/인물)와 같은 대상 (/ 사용자/온도/데이터)를 사용하여 같은 명령을 실행하는 경우 : 메시지

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx/portraits /Users/temp/data 

명령 오류 [ERROR]하지 원격 파일 :/컨텐츠/댐/geometrixx /는

을 초상화하지만 난 (/ 사용자/온도/데이터/신규), 동일한 명령을 다른 대상 폴더를 사용하는 경우 작품 :

vlt --credentials admin:admin export -v http://localhost:4502/crx /content/dam/geometrixx/portraits /Users/temp/data/new 

내가 무엇이 누락 되었습니까? 아니면 vlt 내보내기 명령이 작동하는 방법입니까?

답변

0

Ameesh Trikha의 제안으로 VLT Tools의 내보내기 명령을 동일한 대상 폴더에 사용하기위한 셸 스크립트를 개발했습니다.

때마다 VLT 수출 명령이 실행, jcr_rootMETA-INF 폴더가 생성됩니다. META-INF는 설정 파일을 저장하고 jcr_root는 jcr의 소스 경로에 매핑됩니다. 내 보낸 파일은 여기에 있습니다.

filter.xml로 작성된 경로로 인해 동일한 대상 폴더을 사용하면 연속 내보내기가 작동하지 않습니다. 경로로

  • 로 filter.xml (내가 마스터 필터로 전화 했어)의 복사본을 만듭니다/내용 :이 문제를 극복하기 위해, 나는 다음을 수행하고있다. jcr의 모든 내용은 일반적으로이 항목 아래에 있으므로 모든 소스 경로의 모든 내보내기가 작동합니다.

    : 우리는 기존의 filter.xml 파일을 삭제, 모든 수출에 대해 동일한 대상 폴더를 사용하고 쉘 스크립트의

복사 filter.xml 위의 마스터로 교체 할 계획 때문에

  • #!/bin/bash 
    # This script is used to export the contents from AEM CRX to an external folder. 
    # $1 - Source path from where the files need to be copied from 
    # $2 - Destination path where the files need to be copied to 
    # 
    # Step 1 - Make sure the vault-cli sources are in path 
    export PATH=$PATH:/Users/Software/vault-cli-3.1.16/bin 
    # 
    # Step 2 - vlt overwrites/creates the filter.xml with the source path. We need this to be removed as consecutive exports will not work if the path is not set to the source. To avoid this we remove the filter.xml and copy a file that has /content as the root so any export will work. 
    echo $'***Resetting filter.xml for the export...' 
    rm -f $2/META-INF/vault/filter.xml 
    cp -f /Users/temp/data/filter.xml $2/META-INF/vault 
    echo $'***Completed resetting filter.xml' 
    # 
    # Step 3 
    echo $'***Starting to execute vlt command...' 
    vlt --credentials admin:admin export -v http://localhost:4502/crx $1 $2 
    echo $'***Completed vlt command successfully' 
    

    마스터 필터의 복사본.xxx

    <?xml version="1.0" encoding="UTF-8"?> 
    <workspaceFilter version="1.0"> 
        <filter root="/content"> 
        <exclude pattern="/content/jcr:system"/> 
        <exclude pattern="/content/var/classes"/> 
        <exclude pattern="^.*/rep:accessControl"/> 
        </filter> 
    </workspaceFilter> 
    
  • 1

    첫 번째 vlt export은 콘텐츠 루트가 제한된/사전 설정된 경로 만 가져올 수 있도록 제한하는 META-INF/vault/filter.xml을 생성합니다.

    콘텐츠를 동일한 폴더로 가져 오려면 import 할 모든 경로를 허용하도록 filter.xml을 업데이트해야합니다.

    +0

    요점을 지적 해 주셔서 감사합니다. 그것은 작동하지만, 내가 내보낼 때마다 filter.xml은 소스 경로로 덮어 씁니다. 내보내기를 수행하기 전에 filter.xml을 삭제할 수 있다면 제대로 작동하는 것 같습니다. –

    +0

    당신이 할 수있는 일은 공통 경로로 루트 경로를 설정하여 필터가 블랭킷 경로를 처리하도록하는 것입니다. –