Thursday 8 October 2015

Chapter 20: Secure Copy Jobs


Chapter 20: Secure Copy Jobs


Secure Copy Jobs 
You can define a Secure Copy job to transfer binary files between an agent computer
and a remote computer. The Secure Copy job can upload data to or download data from
a remote server. The data is encrypted during the transfer. By default, a Secure Copy job
uses the SFTP protocol. However, you can define the job to use the SCP protocol.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, Windows,
or i5/OS. The agent must be configured as an FTP client using the Secure Copy Protocol
or the Secure File Transfer Protocol.

Define a Secure Copy Job 
You can define a Secure Copy (SCP) job to transfer binary files using the Secure Copy
Protocol.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, Windows,
or i5/OS.

Follow these steps: 
1. Insert a job and specify the following attributes in the definition:
job_type: SCP 
Specifies that the job type is Secure Copy.
machine
Specifies the name of the machine on which the job runs.
scp_local_name 
Specifies a file on the agent computer to be downloaded or uploaded.




scp_remote_dir 
Specifies the file's remote source directory (if downloading) or the file's remote
destination directory (if uploading).
scp_remote_name 
Specifies the file's source location (if downloading) or the file's destination (if
uploading).
scp_server_name 
Specifies a remote server name.
2. (Optional) Specify optional Secure Copy attributes:
■ job_class
■ scp_local_user
■ scp_protocol
■ scp_server_port
■ scp_target_os
■ scp_transfer_direction




3. (Optional) Specify common attributes that apply to all job types.
The Secure Copy job is defined.

Notes:
■ Attributes that have a default value automatically apply to the job definitions;
therefore, they are optional. For example, jobs with no specified job type are
defined as command jobs by default. Other optional attributes specify information
that is not required but affects how or when a job runs, such as attributes that
specify scheduling conditions.
■ Some optional attributes are common to all job types but others apply to certain
jobs types only. Optional attributes that apply to all job types are known as
common optional attributes. For more information about common optional
attributes and the values that you can specify for them (including their default
values when applicable), see the Reference Guide.
■ For information about required attributes and job type specific optional attributes,
see the procedure topics that provide instructions for defining jobs.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
 Attributes with Default Values


Example: Upload a File Using the Secure File Transfer Protocol
This example uploads the logs.tar file to the /u/tmp directory on the hpsupport server.
The job uses the Secure File Transfer Protocol (SFTP).
insert_job: sftp_upload
job_type: SCP
machine: WINAGENT
scp_transfer_direction: UPLOAD
scp_server_name: hpsupport
scp_remote_dir: /u/tmp
scp_remote_name: logs.tar
scp_local_name: "D:\temp\logs.tar"
scp_protocol: SFTP
owner: causer@WINAGENT
Note: The owner must be defined on CA Workload Automation AE using the
autosys_secure command.

Attributes with Default Values
Attributes that have a default value automatically apply to the job definition. Therefore,
you do not have to specify those attributes in the definition. Your agent administrator
can define some default values on the agent in the agentparm.txt file.
If you specify the attribute in a job definition, it overrides the default.

The following Secure Copy job attributes have default values:
scp_local_user
Specifies a user ID on the computer where the agent is installed. This user ID
determines the access permissions on the agent computer.
Default: User that defined the job

scp_protocol
Specifies whether the SCP data transfer uses Secure File Transfer Protocol (SFTP) or
regular Secure Copy (SCP).
Default: SFTP

scp_server_port
Specifies the port number of the remote server.
Default: 22
 Attributes with Default Values


scp_target_os
Specifies the remote operating system type, which is used to determine the path
separator on the remote system.
Default: UNIX

scp_transfer_direction
Specifies the file transfer direction between the agent computer and the remote
server.
Default: DOWNLOAD
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.


Example: Override the Transfer Direction
The scp_transfer_direction attribute in the following job definition overrides the default
transfer direction.
This example uploads the logs.tar file to the /u/tmp directory on the hpsupport server.
The job uses the Secure File Transfer Protocol (SFTP).
insert_job: sftp_upload
job_type: SCP
machine: WINAGENT
scp_transfer_direction: UPLOAD
scp_server_name: hpsupport
scp_remote_dir: /u/tmp
scp_remote_name: logs.tar
scp_local_name: "D:\temp\logs.tar"
scp_protocol: SFTP
owner: causer@WINAGENT

No comments:

Post a Comment