To archive logs, use the logging command.
To transfer files to the TFTP server, use the logging [provision-archive|1588-archive|corefile-archive] tftp server_ip save_path command.
To transfer files to the SCP server, use the logging [provision-archive|1588-archive|corefile-archive] scp server_ip user save_path command.
To archive logs created during RPD provisioning to the SCP server, use the logging provision-archive scp server_ip user save_path command.
Note |
-
Use provision-archive to archive logs created during RPD provisioning.
-
Use 1588-archive to archive PTP logs.
-
Use corefile-archive to archieve logs created duing system crashes.
-
user is the username of the SCP or TFTP server account to which files are transferred.
-
save_path is the relative path of the folder in the SCP or TFTP server. You must have write permission to access the folder. Make sure
that the folder has sufficient space.
-
server_ip can be IPv4 or IPv6 address. The server IP address type must be the same as the RPD IP address.
-
For SCP file transfer, type the password of your server account when prompted. For TFTP file transfer, password is not required.
-
RPD should be able to successfully ping the SCP or TFTP server. If the ping is unsuccessful, files are not archived.
|
This is an example of how to archive logs created during RPD provisioning to the SCP server.
R-PHY#logging provision-archive scp 198.51.100.1 <user> /tmp
Wait for archiving logs
Collect tech-support info...
Wait for upload archive to server. It would take 3 minutes or more.
RPD logs will be saved in <user>@<server_ip>:/<save_path>/RPD_PROV_10049fc20200_LOG_2018-08-20_00_12_22_419798.tar.gz
Host '<server_ip>' is not in the trusted hosts file.
(ssh-rsa fingerprint md5 b6:bb:d4:20:92:47:bb:29:d7:2c:5d:47:7a:a5:c6:8d)
Do you want to continue connecting? (y/n) y
<user>@<server_ip>'s password:
RPD_PROV_10049fc20200_LOG_2018-08-20_00_12_22 100% 61MB 1.9MB/s 00:32
[Done]
This is an example of how to archive PTP logs to the SCP server.
R-PHY#logging 1588-archive scp 198.51.100.1 <user> /tmp
wait for archiving 1588 logs
Wait for upload archive to server. It would take 3 minutes or more.
RPD logs are saved in user@198.51.100.1:/tmp/RPD_1588_0027900a0cf8_LOG_1977-01-08_21_26_05_222552.tar.gz
Host '198.51.100.1' is not in the trusted hosts file.
(ssh-rsa fingerprint md5 1d:9d:69:0c:17:1e:66:03:11:7e:ff:a3:c1:55:b1:a7)
Do you want to continue connecting? (y/n) user@198.51.100.1's password:
RPD_1588_0027900a0cf8_LOG_1977-01-08_21_26_05 100% 29 0.0KB/s 00:00
[Done]
This is an example of how to archive logs created during system crashes to the SCP server.
R-PHY#logging corefile-archive scp 198.51.100.1 <user> /tmp
wait for archiving corefile
Wait for upload archive to server. It would take 3 minutes or more.
RPD logs are saved in user@198.51.100.1:/tmp/RPD_COREFILE_0027900a0cf8_LOG_1977-01-08_21_27_59_522646.tar.gz
jianyzha@198.51.100.1's password:
RPD_COREFILE_0027900a0cf8_LOG_1977-01-08_21_2 100% 9126KB 8.9MB/s 00:01
[Done]
This is an example of how to archive logs created during RPD provisioning to the TFTP server.
R-PHY#logging provision-archive tftp 198.51.100.1 .
wait for archiving logs
Collect tech-support info...
wait for upload archive to server
RPD provision logs are saved in 198.51.100.1:$TFTP_DIR/./RPD_0027900a0cf8_LOG_1977-01-08_18_20_10_509660.tar.gz
[Done]
This is an example of how to archive PTP logs to the TFTP server.
R-PHY#logging 1588-archive tftp 198.51.100.1 .
wait for archiving 1588 logs
Wait for upload archive to server. It would take 3 minutes or more.
RPD logs are saved in 198.51.100.1:$TFTP_DIR/./RPD_1588_0027900a0cf8_LOG_1977-01-08_21_25_26_352484.tar.gz
[Done]
This is an example of how to archive logs created during system crashes to the TFTP server.
R-PHY#logging corefile-archive tftp 198.51.100.1 .
wait for archiving corefile
Wait for upload archive to server. It would take 3 minutes or more.
RPD logs are saved in 198.51.100.1:$TFTP_DIR/./RPD_COREFILE_0027900a0cf8_LOG_1977-01-08_21_27_37_782555.tar.gz
[Done]