Description

This article explains how to copy files between REs (Routing-Engines) from the UNIX shell.

Symptoms

You may need to copy files between REs from the shell due to problems with access on the CLI or for confirming if files can be transferred from one RE to another.

Solution

  1. Verify that the REs are active:

    > show chassis routing-engine | match current
    Current state                  Master
    Current state                  Backup
  2. Check the file directory for the file you want to copy:

    user@host-re0> file list /var/tmp/jinstall64-14.1R5.4-domestic-signed.tgz
    /var/tmp/jinstall64-14.1R5.4-domestic-signed.tgz
  3. Get root access:

    > start shell user root 
  4. Copy the files with the format:

    rcp -T <source> re1:<destination>

    For example, copying a file from RE0 to RE1:

    % rcp -T /var/tmp/jinstall64-14.1R5.4-domestic-signed.tgz re1:/var/home/user/
    root@host-re0% 
  5. Login to the other RE for reviewing the files:

    > request routing-engine login other-routing-engine
    > file list /var/home/user/jinstall64-14.1R5.4-domestic-signed.tgz
    /var/home/user/jinstall64-14.1R5.4-domestic-signed.tgz

This example command will simulate the following procedure:

> file copy /var/tmp/jinstall64-14.1R5.4-domestic-signed.tgz re1:/var/home/user/jinstall64-14.1R5.4-domestic-signed.tgz

If you need to copy from RE1:

> request routing-engine login re1

Copy the files with the format:

rcp -T <source> re0:<destination>

 

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

Modification History

2022-09-19: Article reviewed for accuracy; minor non-technical edits; article valid and relevant.
2021-03-25: Updated the article terminology to align with Juniper's Inclusion & Diversity initiatives