We need a script to backup configuration of switch B5G124 FROM Inventory Manager using SCP protocol

  • 0
  • 2
  • Question
  • Updated 1 year ago
  • Answered
We need a script to backup configuration of switch B5G124 FROM Inventory Manager using SCP protocol.
Photo of jose barrientos

jose barrientos

  • 92 Points 75 badge 2x thumb

Posted 2 years ago

  • 0
  • 2
Photo of Stephen Williams

Stephen Williams, Employee

  • 8,920 Points 5k badge 2x thumb

Jose,

It looks like you don't need a script for this. In Inventory Manager just right click on the device and select file transfer method. Select SCP.

Photo of jose barrientos

jose barrientos

  • 92 Points 75 badge 2x thumb
Hi Stephen,

Thanks for answer,

I selected SCP like transfer method,  but it no works



 but Inventory Manager shows me the following message





i have the following configuration  on " IMAGES INFORMATION" tab


Photo of Peter

Peter

  • 958 Points 500 badge 2x thumb
scp...on this position is wrong...because it describes the method of moving config from switch to netsight-server / inventory-manager.
When your Netsight-Sever is running on linux you need to create a cron-job using root-rights.
Photo of Ronald Dvorak

Ronald Dvorak, Embassador

  • 46,998 Points 20k badge 2x thumb
In Netsight open the web help and search for "How to Set Up Third-Party Device Support".
There you'd find a description how to add a custom device definition file = script.

I've tried it myself but the new file wasn't visible in the pull down menu to select - not sure what I'm doing wrong - I've restarted Netsight & the client.

The part in the file for the config backup looks like below but as I've mentioned I wasn't able to test it so I'm not sure whether it's correct..

-----BEGIN SCRIPT "Configuration Upload"-----
delete configs/jcn3p.cfg
show config outfile configs/jcn3p.cfg
@receive 20
copy configs/jcn3p.cfg scp://%SCP_USER%:%SCP_PSWD%@%SCP_IP%/%TARGET_FILE_NAME%
exit
Photo of Tomasz Lubas

Tomasz Lubas

  • 534 Points 500 badge 2x thumb
Hello,

i had the same problem some times ago.

Working solution you can find below.
I've changed scp user and pass to scp. You should create scp user on netsight server.

/usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr/properties/devicefiles

-- Use these scripts to manage Enterasys devices
name="B5 SCP Enterasys Networks"
desc="B5 SCP Enterasys Networks SSH/TFTP Scripts"
protocol=scp
--
-----BEGIN PRE-SCRIPT "Configuration Upload"-----
--   create /home/scp/b5-config.cfg
--   create absoluteFilePath2
-----END PRE-SCRIPT-----

-----BEGIN SCRIPT "Configuration Upload"-----
delete configs/config-b5.cfg
@RECEIVE 5
show config outfile configs/config-b5.cfg
@RECEIVE 25
copy configs/config-b5.cfg scp://%SCP_USER%:%SCP_PSWD%@%SCP_IP%/%RELATIVE_TARGET_FILE_PATH%
@RECEIVE 25
exit
-----END SCRIPT-----