To export management plane and data plane logs from a device in maintenance mode, follow these steps:
Once the device boots into maintenance mode and presents the welcome screen, hit Enter to continue.
Navigate to the option Log Files and hit Enter.
Navigate to "Copy logs to an external location" and hit Enter.
Provide the details of Server/Path/Username/Password and select SCP or TFTP.
The last step is to navigate to submit and hit Enter. If the file transfer does not complete due to any reason, an error will show up indicating the failure. Trasnfer will take some time as it has to generate a techsupport file.