This article provides example commands to archive and copy logs files between JDM ( Juniper Device Manager) , JCP ( Junos Control Plane) , and Hypervisor on NFX250.
Below are various archive and copy examples taken from 15.1X53-D45:
tar -czvf /var/third-party/hypervisor-CURRENT-DATE.tgz /var/log/*
hypervisor-CURRENT-DATE.tgz
/var/log
/var/third-party/
Tip: Use this option if you have network connectivity from JDM to export logs outside the device.
vJunos0/JCP
file archive compress source /var/log/* destination /var/tmp/JCP-CURRENT-DATE.tgz
/var/tmp
scp [email protected]:/var/tmp/JCP-logs.tgz /var/tmp/
Tip: Use this option if you have connectivity only from JCP to export the logs from the device
/var/log/
tar -czvf /var/tmp/JDM-logs.tgz /var/log/*
/bin/sh: 1: /usr/bin/tar: not found
JCP/vJunos0
tar -czvf /var/tmp/hypervisor-logs /var/log/*
scp /var/tmp/hypervisor-logs 192.168.1.2:/var/tmp/
Notes:
/etc/hosts
root@NFX-JDM
:/var/third-party# cat /etc/hosts 127.0.0.1 localhost 192.168.1.1 hypervisor 192.168.1.2 vjunos0 <<<<<<<<<<<<<<<<<<<<<<< 192.168.1.3 vjunos1 192.168.1.4 vsrx 192.168.1.254 jdm NFX-JDM 128.0.0.254 jdm NFX-JDM 192.168.1.5 ipsec-nm 192.168.1.100 vSRX-7 192.168.1.101 vSRX-77
2021-09-21: Added note that "file archive compress" should not be used on JDM. 2020-07-23: Added note that IP address of vjunos0 changed to 192.0.2.2 beginning with 15.1X53-D470 and higher