Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Emilio_Espinosa
Contributor

Max file size to import in Command Line

I am trying to create a many hosts using command line  scripting, as there is a limit when pasting the commands I am using the open file feature. The problem is when selected the message  "The file is too big and cannot be loaded" is presented. Does anybody know what is the size limit I can import in?? It seems it is not very large at all, not really helpful. I had to split my file in ten smaller parts. The original file's size is 99kb. 

 

ChecpointCommandLine.jpg 

0 Kudos
9 Replies
the_rock
Champion
Champion

I believe its 64 kb.

0 Kudos
PhoneBoy
Admin
Admin

Anything more than a few hundred lines will probably fail.
Further, making that many changes without a publish will take a long time and/or fail.

Better to use mgmt_cli to do this as described here: https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solut... 
You will likely have to break the file up into several chunks if you use this approach.
You might see better performance (and be able to do more objects at once) using add objects-batch in R80.40 and above: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-objects-batch~v1.6%20 

0 Kudos
Emilio_Espinosa
Contributor

Yes, indeed, I had to discard about 1900 changes because Smartconsole fail to publish the changes due to disconnection to Smart-1. 

I will try to use instead CSV files, haven't done this option in the past. 

But what is worth to mention in the SKs  is the max limits to import. I have to create near 3,000 hosts to block because out financial authorities suggest to do it as they have been detected to use port scanning tools.

Even with such options to add hosts as a CSV batch or clish, will take a while to do the work and still, need to find out the limits in order to avoid failures. Is there any command to publish changes in clish mode? This will help to do so, I think.

 

 

Thanks for your answer.

0 Kudos
the_rock
Champion
Champion

You are right, yes, it is a lot of work. This is what TAC gave me back in December 2020 and I did it few times and works really well. Again, not a script, but I like this method.

--->To add address-range via API:
mgmt_cli add address-range --batch address-ranges_full.csv

#cat address-ranges_full.csv
name,ip-address-first,ip-address-last
range1,10.0.0.0,10.0.0.100

---> To add a network via API:
mgmt_cli add network --batch networks.csv

#cat networks.csv
name,subnet,subnet-mask
network1,10.10.10.0,255.255.255.0
network2,20.20.20.0,255.255.255.0
network3,30.30.30.0,255.255.255.0

---> To add a host 
mgmt_cli add host --batch test.csv

#cat test.csv
name,ip-address
obj1,192.168.1.1

0 Kudos
Emilio_Espinosa
Contributor

How fast is this option against clish commands? Does it accept more "lines" too?

0 Kudos
the_rock
Champion
Champion

I checked my notes and see back in Feb 2021 I did it in my lab with 3255 lines and worked fine, no issues. I dont know if there is a limit, first, cause I never asked and second, customer only needed about 450 entries : - )

Andy

0 Kudos
Emilio_Espinosa
Contributor

3255 lines?, works for me.

Thanks for your feedback!

the_rock
Champion
Champion

Any time, happy to help!

0 Kudos
the_rock
Champion
Champion

This is the sk I meant to send. This does not mention any limits anywhere that I can see.

How to import multiple objects into the R8x.x Management database using a .csv file (checkpoint.com)

0 Kudos