Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
the_rock
Legend
Legend

Exporting large group of IPs into a file from mgmt_cli

Hey guys,

Apologies if this may sound like a really silly question, but Im trying to figure out if Im doing this right. To make a long story short, I imported customer's config into my lab and trying to see if I can export large group with about 5000 IPs into csv format file via cli, but not having much luck so far. Below is command I ran:

mgmt_cli show group name "Block" > block.csv

It seems like it did take it and after I logged in, its just "sitting" there for 20 mins and file size is not moving at all.

If someone could confirm if this is correct, would be awesome.

Tx as always.

Andy

0 Kudos
6 Replies
Nüüül
Advisor

Hi Andy,

did you try to execute it without redirecting to a file?

what exactly do you want/need to achieve? 

as output would be like this:

Click to Expand
- uid: "ff7ae4dc-9f1e-4c1e-af2b-217a6834083c"
name: "net_auto_feed_zoom-221.122.64.0-24"
type: "network"
domain:
uid: "41e821a0-3720-11e3-aa6e-0800200c9fde"
name: "SMC User"
domain-type: "domain"
subnet4: "221.122.64.0"
mask-length4: 24
subnet-mask: "255.255.255.0"
icon: "NetworkObjects/network"
color: "blue"

 when having so much objects, maybe using async-response would help

 

Click to Expand
mgmt_cli --session-id sid --format json show group async-response true name groupname ( maybe some jq magic like| jq .tasks[0] and so on) > out.txt

 

0 Kudos
the_rock
Legend
Legend

Hey @Nüüül 

Tx a lot for responding, appreciated! Yes, without redirecting to a file, works fine, but reason why I need a file is because we are trying to get right CSV file that can be imported into S1C portal for the customer, but only TAC can do it, since there is no regular ssh access.

Andy

0 Kudos
Nüüül
Advisor

OK, i would go with the web API - exporting all the objects and reimporting them to smart1cloud. As web API should still be there (another argument necessary "context" if i remember correctly)

 

 

0 Kudos
the_rock
Legend
Legend

Do you have an example? I tried exporting from smart console, but does NOT let you export only single group, even from object explorer : - (

Andy

0 Kudos
Nüüül
Advisor

how urgent is this? can send you something tomorrow if thats ok?

0 Kudos
the_rock
Legend
Legend

Its not urgent, no rush. Im just trying to see if I can get this exported from the lab, but so far, no luck.

Andy

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events