upload command

Use the upload command to upload log files to a server. The XML log files are generated using the getinfor command. If the upload command is specified, the log file is automatically uploaded to the specified server.

upload command syntax

OneCli.exe inventory upload [--srcdata<file>][--upload [Lenovo/multitool/serveraddress]\
[username:password@ftphost]@ftphost/path/]
Table 1. upload command parameters
Parameter Required/Optional Notes
--srcdata Required Used to identify the log file that will be formatted and uploaded to a server.
--upload Required
  • If multitool is specified, upload the files to a Lenovo multitool web server.
  • If Lenovo is specified, upload the files to a Lenovo server.
  • If the server address is specified, then the output files are uploaded the specified server. the command parameter supports ftp and sftp. For example, Onecli inventory getinfor --output output --upload ftp://root:SYS2009health@10.240.193.x/log/"

  • If not specified, there is no upload.
--output Optional A report file is saved to the specified directory.

Example of the upload command

In this example, --srcdata is used to identify the log file name that will be formatted and uploaded to a server.
OneCli.exe inventory upload --srcdata xxx.xml
--output d:\onecli\inventory
--upload Lenovo --proxy user:
password@host:port