Forum Discussion

Mahmoud_Saad_37's avatar
Mahmoud_Saad_37
Icon for Nimbostratus rankNimbostratus
Jan 18, 2019

Editing .UCS archive then restore it back

Hello,

 

I have two .UCS archives and I want to copy parts of the configuration from one and paste them to another. Can I paste the required lines then restore the file to the F5 appliance ?

 

Example I need to copy this lines to another archive:

 

} apm report default-report { report-name sessionReports/sessionSummary user /Common/admin }

 

Thanks,

 

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    I suppose there are also benefits working on the ucs archive, e.g. it is easy to find the specifc file you want to edit.

    The ucs archive is just a compressed tar file. You can do the following:

    To see the archive file's structure (where the files will go after untar'ing):

     tar -ztf /path/to/ucs_file.ucs

    To do it for real:

     tar -zxf /path/to/ucs_file.ucs

    To put it all back together after editing:

     tar cvf - * | gzip -c > /path/to/new_ucs_file.ucs

    .