copy
This command copies a file to or from the appliance.
Syntax
copy [-f] source destination [manager]
Parameters
-f
- Overwrites an existing file when one with the same name exists. When omitted, an attempt to save a file with the same name as an existing file results in a confirmation prompt.
- source
- destination
- Specifies the locations as a URL that identifies the source file
and target destination.
- When the source or destination is the appliance, use the
directory:///file
format. - If the source file or target destination is remote and the transport
protocol is SCP or SFTP, use a format that is RFC 1738 compliant.
- To use an absolute path.
scp://user@host:port//file_path
- To use a path that is relative to the user's home directory.
scp://user@host:port/file_path
Where:- host
- Specifies the fully qualified host name or IP address of the remote server. If DNS is enabled, the host name.
- port
- Specifies the listening port on the remote server.
After you enter the command, the appliance prompts you for the remote login password.
- When the source or destination is the appliance, use the
- manager
- Specifies the name of an XML manager that defines the user agent
for basic authentication. When omitted, the appliance uses the basic
authentication settings for the
default
XML manager.
Guidelines
The copy command transfers files to or from the DataPower® appliance. You must issue this command from the appliance.
- The optional -f parameter forces an unconditional copy. When provided, the command does not warn of possible file overwrites.
- The optional manager parameter defines the
basic authentication configuration to use. When provided, the command
uses the user agent for this XML manager instead of the
default
XML manager.
When the source file or target destination is remote to the appliance, this command supports only
the following protocols:
- HTTP
- HTTPS
- Secure Copy (SCP)
- Secured File Transfer Protocol (SFTP)
Note: If you use SCP or SFTP to copy multiple files at the same time, a system error might
occur. The appliance supports only one SCP or SFTP connection at a time. Issue the command again if
you encounter a system error.
To send a file from the appliance as an email, use the global send file command.
Restriction: When you use the copy command,
be aware of the following restrictions.
- You cannot copy files from the cert: directory.
- You cannot copy files to the audit:, logstore:, or logtemp: directory.
Examples
- Use HTTP to copy a file from the specified location to the
image:
directory.(config)# copy http://host/image.crypt image:///image.crypt File copy success (1534897 bytes transferred)
- Use HTTP over SSL to copy a file from the specified location to the
image:
directory.(config)# copy https://host/image.crypt image:///image.crypt File copy success (1534897 bytes transferred)
- Use HTTP to copy a file from the specified location to the
local:
directory with the basic authentication credentials in thesec
XML manager.(config)# copy http://host/sec/stock.wsdl local:///stock.wsdl sec File copy success (2022 bytes copied)
- Use SCP to copy a file from the specified location to the
store:
directory.(config)# copy scp://jrb@10.10.1.159//XML/stylesheets/InitialConvert.xsl store:///InitialConvert.xsl Password: yetanotherpassword File copy success
- Use SCP to copy a file from the
logstore:
directory to the specified remote target (identified by a qualified host name).(config)# copy logstore:///Week1.log scp://jrb@ragnarok.datapower.com//LOGS/Week1.log Password: yetanotherpassword File copy success
- Use SFTP to copy a file from the specified location to the
store:
directory.(config)# copy sftp://jrb@10.10.1.159//XML/stylesheets/InitalConvert.xsl store:///InitalConvert.xsl Password: yetanotherpassword File copy success
- Use SFTP to copy a file from the
logstore:
directory to the specified remote target.(config)# copy logstore:///Week1.log sftp://jrb@10.10.1.159//LOGS/x/Week1.log Password: yetanotherpassword File copy success
- Copy the
startup-config
file from theconfig:
directory to thelocal:
directory.(config)# copy config:///startup-config local:///startup-config file copy successful (2347 bytes transferred)