
copy
Copies any file from a source to a destination.
Syntax: copy source destination
copy {tftp | ftp} destination
copy source {tftp | ftp}
copy ftp filename internal
copy source scp
tftp
When copying a file to or from a remote system, use the Trivial File Transfer Protocol to copy the file.
ftp
When copying a file to or from a remote system, use the File Transfer Protocol to copy the file.
scp
File is encrypted when copied.
source
File to be copied. See the table below for a description of the possible sources.
destination
Destination of the file to be copied. See the table below for a description of the possible destinations.
filename
Name of destination file for internal FTP between primary and backup servers. The CLI prompts for the source file name once the initial command is entered.
Description: The copy command is used to copy files from a variety of sources to a variety of destinations.
Use the copy source destination syntax to copy any file from a source to a destination.
Use the copy {tftp | ftp} destination syntax to copy a file from a remote system.
Use the copy source {tftp | ftp} syntax to copy a file to a remote system.
Use the copy source scp syntax to copy a file in encrypted mode (secure copy). This command is only available with Secure Shell (SSH) enabled.
Use the copy ftp filename internal command to FTP a file from the partner server to the server the command was entered on. The filename specifies the name of the file that will reside on this server after the transfer. The CLI prompts for the source file name of the file that exists on the partner server prior to the transfer. If the filename already exists on the local server, the CLI prompts for whether it is alright to over-write the current file.
The entries in the table below describe the sources and destinations available with the copy command. The value described by each keyword can be either a source or a destination for the copied file:
When you copy a file to or from a remote system, the CLI prompts you to provide some or all of the following information:
Source filename
Enter the name of the file to copy. File names may be up to 8 characters long with a 3 character extension.
Destination filename
Enter the name the file as given on the destination system.
Host directory
Enter the name of the directory on the remote system where the source file is located (for copying from a remote host).
Host name or address
Enter the name or IP address of the remote system where the source file is located (for copying from a remote host).
Username
Enter your user name on the remote host.
Password
Enter your password on the remote host. The text does not appear as you type.
Factory Default: None.
Command Mode: Privileged.
Example 1: The following example copies a file (test.doc) in the local directory to a new file (final.doc) in the same directory. (If the new file name does not exist, it is created):
router#copy test.doc final.doc
Example 2: The following example copies a file named techpubs.doc from the local default device to a remote system using tftp:
router#copy techpubs.doc tftp
Enter destination filename: techpubs.doc
Enter hostname or address: 140.122.1.190
Example 3: The following example copies a file from drive /pub/config on remote system 140.122.1.13 to a file named test.cfg on the local server using the File Transfer protocol:
router#copy ftp test.cfg
Enter source filename: new.cfg
Enter host directory: /pub/config
Enter hostname or address: 140.122.1.13
Username: username1
Password:
Remote Copy Succeeded!
Example 4: In the following example, the copy source ftp syntax is used to copy the startup configuration file (the source) to a file named test.cfg on a remote host using FTP. You are prompted to enter the filename, directory and IP address or hostname of the remote system:
router#copy startup-config ftp
Enter destination filename: test.cfg
Enter host directory: /pub/config
Enter hostname or address: 140.122.1.190
Username: username2
Password:
Remote Copy Succeeded!
Example 5: The following example copies the startup configuration file in the local directory to the running configuration file in the local directory:
router#copy startup-config running-config
Loading Configuration...
Example 6: In the following example, the copy ftp filename internal command FTPs the startup.cfg file from the partner server and renames it temp2.txt before copying it to this server:
router#copy ftp temp2.txt internal
229770240 bytes free
Do you want to proceed ? (y/n)[n]: y
Enter source filename: startup.cfg
Enter host directory:
Transferring file....done
Network copy succeeded
router#
Related Commands: dir
show running-config
show startup-config
write
Copyright © 2005
Avici Systems Inc.
Avici® and TSR®
is a registered trademark of Avici Systems Inc.
IPriori, Composite Links, SSR, QSR, and NSR® are
trademarks of Avici Systems Inc.
Source
File Name: ConfigFileMgrCmd.fm
HTML File Name: ConfigFileMgrCmd5.html
Last Updated: 02/25/05 at 14:26:17