copy
This command downloads and uploads files from and to the device, respectively.
Syntax
# copy <File Type> from|to {<URL>|console|usb:///<Filename>} [network-source <IP Interface>]
Command |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
File Type |
|||||||||||||
aux-package |
Defines the file type as an auxiliary package file, allowing you to download or upload a batch of auxiliary files, using a TAR (Tape ARchive) file (.tar). The TAR file can contain any number and type of Auxiliary files, for example, a Dial Plan file and a CPT file. |
||||||||||||
call-progress-tones from |
Defines the file type as a Call Progress Tones (CPT) file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
cas-table from |
Defines the file type as a Channel Associated Signaling (CAS) table file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
cli-script {from|to} |
Defines the file type as a CLI script file. |
||||||||||||
configuration-pkg {from|to} |
Defines the file type as a Configuration Package file (.7z), which includes all files. For uploading a Configuration File that is password-protected, use the encrypted option to specify the password: copy configuration-pkg from <URL> encrypted <Password> For downloading the Configuration File, if you want to password-protect it and include the TLS certificates, use the encrypted and certificates options, respectively: copy configuration-pkg from <URL> encrypted <Password> certificates |
||||||||||||
debug-file to |
Defines the file type as a debug file and copies the file from the device to a destination. The debug file contains the following information:
May include additional application-proprietary debug information. The debug file is saved as a zipped file with the following file name: "debug_<device name>_ver_<firmware version>_mac_<MAC address>_<date>_<time>". For example, debug_acMediant_ver_700-8-4_mac_00908F099096_1-03-2015_3-29-29. |
||||||||||||
dial-plan from |
Defines the file type as a Dial Plan file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
firmware from |
Defines the file type as a firmware file (.cmp). Note: After the .cmp file is loaded to the device, it's automatically saved to the device's flash memory with a device restart. |
||||||||||||
incremental-ini-file from |
Defines the file type as an ini file, whereby parameters that are not included in the ini file remain at their current settings. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
ini-file {from|to} |
Defines the file type as an ini file, whereby parameters that are not included in the ini file are restored to default values. Note: The file can be uploaded to or downloaded from the device. |
||||||||||||
mt-firmware |
Defines the file type as a firmware file (.cmp) for Media Transcoders (MT) in the Media Transcoding Cluster feature. |
||||||||||||
nginx-conf-files to |
Defines the file type as an NGINX configuration file (for HTTP Proxy services). The following files are copied:
|
||||||||||||
prerecorded-tones from |
Defines the file type as a Prerecorded Tones (PRT) file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
redundant-debug-file to |
Defines the file type as a debug file of the Redundant device in the High-Availability (HA) system, and copies the file from the device to a destination. Note: The file can only be downloaded from the device (see the command 'from' below). |
||||||||||||
sbc-wizard from |
Defines the file type as a SBC Wizard Configuration Template file, which is used by the Configuration Wizard. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
startup-script from |
Defines the file type as a Startup CLI script file. |
||||||||||||
storage-history |
Defines the file type as a locally stored Call Detail Record (CDR) file. Define the name of the service. To view services, run the command show storage-history services. Currently supported services: cdr-storage-history and sdr-storage-history |
||||||||||||
system-log |
Defines the file type as a system log file. Note: The file can only be downloaded from the device (see the command to below). |
||||||||||||
system-log-no-sip |
Defines the file type as a system log file without SIP messages. Note: The file can only be downloaded from the device (see the command to below). |
||||||||||||
system-log-persistent |
Defines the file type as a persistent system log file. Note:
|
||||||||||||
tls-cert from |
Defines the file type as a TLS certificate file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
tls-private-key from |
Defines the file type as a TLS private key file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
tls-root-cert from |
Defines the file type as a TLS trusted root certificate file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
user-info from |
Defines the file type as a User Info file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
vmc-firmware |
Defines the file type as a firmware file (.cmp) for Media Components (MC) in the Media Cluster feature. |
||||||||||||
voice-prompts |
Defines the file type as a Voice Prompts (VP) file. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
web-favicon from |
Defines the file type as an icon file associated with the device's URL saved as a favorite bookmark on your browser's toolbar when using the device's Web interface. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
web-logo from |
Defines the file type as an image file, which is displayed as the logo in the device's Web interface. Note: The file can only be uploaded to the device (see the command 'from' below). |
||||||||||||
Download/Upload |
|||||||||||||
from |
Uploads a file to the device. |
||||||||||||
to |
Sends a file from the device to a specified destination. |
||||||||||||
File Location |
|||||||||||||
URL |
Defines the URL from/to which to upload/send the file. The file transfer protocol can be one of the following:
Note: The URL for HTTP/S and SCP can include the authentication username and password, using the following syntax (e.g., HTTPS): https://<Username>:<Password>@<IPv4 or IPv6>/<Path> For example: copy firmware from https://sue:1234@10.4.10.0/firmware.cmp |
||||||||||||
console |
Displays the current .ini configuration file on the CLI console. Note: The command is applicable only to the .ini configuration file (copy ini-file to). |
||||||||||||
usb:///<file name> |
Uploads the file from a USB stick that is connected to the device, or downloads the file from the device to a USB stick connected to the device. Note: The command is applicable only to devices that provide a USB port interface. |
||||||||||||
IP Interface |
|||||||||||||
network-source <IP Interface> |
Defines the IP Interface by name (configured in the IP Interfaces table) to use for the copy process. By default (i.e., network-source is not configured), the device uses the IPv4 OAMP or IPv6 OAMP interface (in the IP Interfaces table) for the copy process for IPv4 or IPv6 servers, respectively. If there is no OAMP IP Interface with the same IP version (IPv4 or IPv6) as the remote server, the copy process fails. |
Command Mode
Privileged User
Related Commands
■ | erase |
■ | dir |
■ | write |
Note
■ | When you upload a file to the device, you must run the write command to save the file to flash memory; otherwise, the file is deleted when the device restarts or powers off. |
■ | For more information on the different file types, refer to the User's Manual. |
■ | During firmware file (.cmp) upload, a message is displayed showing uploaded progress information. The message is also displayed in the console of all other users that are currently connected to the device through CLI. The message forcibly stops the users from performing further actions, preventing them from interrupting the uploaded process. Below shows an example of such a message: |
# copy firmware from http://10.3.1.2:1400/tftp/SIP_F7.20A.140.226.cmp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 40.7M 100 40.7M 0 0 1288k 0 0:00:32 0:00:32 --:--:-- 1979k Firmware file http://10.3.1.2:1400/tftp/SIP_F7.20A.140.226.cmp was loaded. (user: Admin, IP local) The system will reboot when done DO NOT unplug/reset the device ............................................................. Firmware process done. Restarting now... Restarting......
The displayed information includes:
● | %: Percentage of total bytes downloaded and uploaded; downloaded is displayed only when downloading a file (i.e., copy from command) |
● | Total: Total bytes downloaded and uploaded. |
● | %: Percentage of downloaded bytes (copy from command only). |
● | Received: Currently downloaded bytes (copy from command only). |
● | %: Percentage of uploaded bytes (copy to command only). |
● | Xferd: Currently uploaded bytes (copy to command only). |
● | Average Dload: Average download speed in bytes/sec (copy from command only). |
● | Speed Upload: Average upload speed in bytes/sec (copy to command). |
● | Time Spent: Elapsed time. |
● | Time Left: Time remaining for the file upload/download to complete. |
● | Current Speed: Current upload/download speed in bytes/sec. |
Example
■ | Uploading firmware file from an HTTP server and using IP Interface "MyOAMP": |
# copy firmware from http://192.169.11.11:80/SIP_F7.20A.260.002.cmp network-source MyOAMP
■ | Displaying (copying) the ini configuration file to the CLI console: |
# copy ini-file to console
■ | Uploading Auxilliary file batch from an HTTP server: |
# copy myauxfiles.tar from http://www.exmaple.com/auxiliary
■ | Uploading CLI-based configuration from a TFTP server: |
# copy cli-script from tftp://192.168.0.3/script1.txt
■ | Upgrading the device’s firmware from an HTTP server: |
# copy firmware from http://www.exmaple.com/firmware.cmp
■ | Uploading Dial Plan file: |
copy dial-plan from http://10.4.2.2/MyHistoryFiles/