Knowledge Search


×
 

Copy files from one location to another on a Routing Engine

  [KB7968] Show Article Properties


Summary:
How to copy files from one location to another in a Routing Engine
Symptoms:
How to copy files from one RE to the other
Cause:
 
Solution:

Copy file from one directory to another:

In order to move files from one directory to another on a local router, use the following command:

user@host> file copy <source> <destination>

eg., user@host> file copy /var/log/file1.txt /var/tmp/file1.txt


In this example, file file1 is copied from the /var/log directory to /var/tmp.



Copy a file from one Routing Engine to another:

On Dual Routing engine routers, sometimes there is a need to copy files from the Master RE to the Backup RE, and vice versa.

To copy a file in such a situation, use the following command:

user@host> file copy <source> <destination>

eg., user@host> file copy /var/tmp/jinstall-11.2R1.7-domestic-signed.tgz re1:/var/tmp/jinstall-11.2R1.7-domestic-signed.tgz


In this example, when run in the Master RE, the Junos image on the Master RE is copied from the /var/tmp/ directory to the /var/tmp/ directory on the Backup RE.

For more details on how to copy configuration files from Master RE to Backup, refer to 'Copying a Configuration File from One Routing Engine to the Other'.



Copy files from local Router to Remote host:

To copy files from  local router to a remote host, FTP or Secure Copy Protocol (SCP) can be used:

root@host> file copy filename ftp://hostname/filename

eg., root@host> file copy /var/log/messages ftp://ftp.juniper.net/2012-0101-0001/messages


In this example, the log messages from local router are copied to the juniper FTP server as anonymous under the directory of 2012-0101-0001.

For more details on copying files, refer to 'Copy a File on a Routing Engine'.

Related Links: