nerdexam
Huawei

H12-891_V1.0 · Question #258

Engineers need to download the device configuration file vrpcfg.cfg locally through SFTP, then rename the configuration file to backup.cfg and re-upload it to the device's default directory. It is…

The correct answer is A. sftp.get('/vrpcfg.cfg', r'C:\backup.cfg') sftp.put(r'C:\backup.cfg', '/backup.cfg'). See the full explanation below for the reasoning.

SDN and Network Automation

Question

Engineers need to download the device configuration file vrpcfg.cfg locally through SFTP, then rename the configuration file to backup.cfg and re-upload it to the device's default directory. It is known that the configuration file path of the device is /vrpcfg.cfg, which is located in the default directory / of the device. The engineer's local file path is C:. Which of the following Python Paramiko codes can achieve the above function?

Options

  • Asftp.get('/vrpcfg.cfg', r'C:\backup.cfg') sftp.put(r'C:\backup.cfg', '/backup.cfg')
  • Bsftp.get(r'C:\backup.cfg','/vrpcfg.cfg') sftp.put('/backup.cfg,r'
  • C:\backup.cfg') C.sftp.get('/vrpcfg.cfg', r'C:\vrpcfg.cfg') sftp.put('/backup.cfg', r'C:\vrpcfg. cfg')
  • Dsftp.get('/vrpcfg.cfg', r'C:') sftp.put(r'C:\backup.cfg', '/')

How the community answered

(33 responses)
  • A
    70% (23)
  • B
    9% (3)
  • C
    15% (5)
  • D
    6% (2)

Topics

#SFTP#Python Paramiko#file transfer#network automation

Community Discussion

No community discussion yet for this question.

Full H12-891_V1.0 Practice