Forum Discussion
Import multiples iFiles
Anyone knows if there are ways to import multiple ifiles? There are approx 600 ifiles (mostly are jpg and a few html file) and want to find out what are the options available and thank you in advance.
6 Replies
- Michael_Jenkins
Cirrostratus
Though I haven't done it myself, there is a way to do it with iControl. This question may help. The LocalLB::iFile and LocalLB::iFileFile namespaces may be of some use, though I think you need to make sure the files have been copied to the device first, then you can use iControl to import them.
- StephanManthey
Nacreous
Hi erictran,
before importing files make sure there are no spaces in file names and individual file size does not exeed the maximum size of 4 MByte. I´m using the following one-liners to get the files into filestore and declare them as iFiles. It will be necessary to upload these files i.e. via SCP into a dedicated directory i.e. /shared/fileimport/.for file in `ls`; do ls -l | grep -iv '^total' | echo "tmsh create sys file ifile "$file" source-path file:"`pwd`"/"$file | bash -x; done for file in `ls`; do ls -l | grep -iv '^total' | echo "tmsh create ltm ifile "$file" file-name "$file | bash -x; doneThat´s it. Hopefully it saves you a couple of hours. 🙂
Thanks, Stephan - uni_87886
Cirrostratus
To refine Stephan's response, try this:
for file in *; do tmsh -c "create sys file ifile $file source-path file:`readlink -f $file`; create ltm ifile $file file-name $file"; done- erictran_173846
Nimbostratus
I've also tried this option and this work just as well.
- uni
Altocumulus
To refine Stephan's response, try this:
for file in *; do tmsh -c "create sys file ifile $file source-path file:`readlink -f $file`; create ltm ifile $file file-name $file"; done- erictran_173846
Nimbostratus
I've also tried this option and this work just as well.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com