<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Metadata Exportpackage - remotely in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/528064#M15457</link>
    <description>&lt;P&gt;This is not really a SAS problem, but hey...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally, executing a remote command using SSH goes like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ssh userid@remotehost "your command".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case it would involve having the entire script executed remotely. Your command would be ExportPackage and its parameters or perhaps the entire script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add options to ssh to avoid chatter that cannot be handled when running non-interactively. Most noteworthy are '-PasswordAuthentication no', 'StrictHostKeyChecking no' and 'LogLevel quiet'. Also you must have your public key shared between the hosts so you can use ssh passwordless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And keep in mind that the resulting package and log files will be created remotely as well. So unless you have a shared filesystem you will have to scp them back to the calling host as a next step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do keep in mind that this command does not need to be executed on the metadata server. It can be done from any machine that has SAS installed at or least the SASPlatformObjectFramework installed and an unhindered network connection to the metadata server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 15:18:48 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2019-01-17T15:18:48Z</dc:date>
    <item>
      <title>Metadata Exportpackage - remotely</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/527718#M15446</link>
      <description>&lt;P&gt;I need to write a script for Linux to do automated SAS Metadata Security Exports on a daily basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the Control-M Scheduler must pick up the script located in our SAN folders and execute it on one of the Metadata Cluster Nodes.&lt;/P&gt;
&lt;P&gt;How would I specify this Node in the Linux Code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far the Linux script has:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;# =====SAS METADATA EXPORT OF MKTG SAS ACTs
 
#--- Declare Script Variables ---#
typeset currentdate="$(date +'%Y%m%d')"
typeset bin_loc="/opt/sasbin/software/SASPlatformObjectFramework/9.4"
typeset log_loc="/sasdata/SASAdmin/content_promotion/logs"
typeset runas_acc="SASAdmin.swa"
# =====

$bin_loc/ExportPackage -profile $runas_acc -package "$spk_loc/Marketing_ACTs_Export.spk" -disableX11
-objects "/System/Security/Access Control Templates/MKTG PROD Read Only ACT(ACT)" 
"/System/Security/Access Control Templates/SALES PROD ACT(ACT)" 
-subprop 
-includeDep
-modified
-log $log_loc/MKTG_ACTs_Export_Log_$currentdate.log;

Err_Exports ACT
Err_Log_File $log_loc/MKTG_ACTs_Export_Log_$currentdate.log
if [ $? -eq 8 ]
then
    exit 8
fi

Err_Log_File()
{
        find $1 |while read file
        do
                RESULT=$(egrep -i "error" $file)
                if [[ ! -z $RESULT ]]
                then
                        echo -e "$RESULT";
                        return 8;
                fi
        done
}&lt;BR /&gt;&lt;BR /&gt;# == do the same for Groups&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to test this first by running the&amp;nbsp; Linux script file. Normally one would SSH from the current server into the remote server. I am not a Linux script master. So not sure how to do this. I know hhow to do this in Powershell Win 2012 R2 but not too familiar with Linux BASH scripting...&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 14:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/527718#M15446</guid>
      <dc:creator>Lenvdb</dc:creator>
      <dc:date>2019-01-16T14:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Metadata Exportpackage - remotely</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/528064#M15457</link>
      <description>&lt;P&gt;This is not really a SAS problem, but hey...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally, executing a remote command using SSH goes like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ssh userid@remotehost "your command".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case it would involve having the entire script executed remotely. Your command would be ExportPackage and its parameters or perhaps the entire script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add options to ssh to avoid chatter that cannot be handled when running non-interactively. Most noteworthy are '-PasswordAuthentication no', 'StrictHostKeyChecking no' and 'LogLevel quiet'. Also you must have your public key shared between the hosts so you can use ssh passwordless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And keep in mind that the resulting package and log files will be created remotely as well. So unless you have a shared filesystem you will have to scp them back to the calling host as a next step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do keep in mind that this command does not need to be executed on the metadata server. It can be done from any machine that has SAS installed at or least the SASPlatformObjectFramework installed and an unhindered network connection to the metadata server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 15:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/528064#M15457</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2019-01-17T15:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Metadata Exportpackage - remotely</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/530576#M15507</link>
      <description>&lt;P&gt;Thank you Jan&lt;/P&gt;
&lt;P&gt;Running this on any server in the cluster that has SASPlatformObjectsFramework installed is the solution...No requirement then for running it remotely.&lt;/P&gt;
&lt;P&gt;Len&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 10:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Metadata-Exportpackage-remotely/m-p/530576#M15507</guid>
      <dc:creator>Lenvdb</dc:creator>
      <dc:date>2019-01-28T10:19:14Z</dc:date>
    </item>
  </channel>
</rss>

