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,

Hi Mahmoud,

I’d like to recommend using *.SCF (Single Configuration File) instead of *.UCS (User Configuration Set), if you want to edit/merge them. Its much easier because the entire configuration is included in a single text file which can be easily manipulated as needed…

Cheers, Kai

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

.