Working with the custom files

Describes the procedure to edit the customer.custom file or directory

Editing the customer.custom file

Administration privileges are required for editing the customer.custom file.

This section describes the various options that are applicable when you export a file.

Consider the following scenarios for exporting a file:

  • Include a file abc.txt present in the /opt/test directory.
  • Include all the file extensions that start with abc in the /opt/test/check directory.
  • Include multiple files using regular expressions.

To edit the customer.custom file from the Web UI:

  1. On the Web UI, navigate to Settings > System > Files.
  2. Click Edit beside the customer.custom file.
  3. Configure the following settings to export the file.
    #To include the abc.txt file
    /opt/test/abc.text
    #If the file does not exist, skip the export of the file
    optional:/opt/test/pqr.txt
    #To include all text files
    /opt/test/*.txt
    #To include all the files extensions for file abc present in the /opt/test/check directory
    /opt/test/check/abc.*
    #To include files file1.txt, file2.txt, file3.txt, file4.txt, and file5.txt
    /opt/test/file[1-5].txt
    
  4. Click Save.

    It is recommended to use the Cluster export task to export Appliance Configuration settings, SSH settings, Firewall settings, LDAP settings, and HA settings. Do not import Insight certificates using Certificates, rotate the Insight certificates using the steps from Rotating Insight certificates.
    If the files exist at the target location, then they are overwritten.

Editing the customer.custom File to Include Directories

This section describes the various options that are applicable when you export a file.

Consider the following scenarios for exporting files in a directory:

  • Export files is the directory abc_dir present in the /opt/test directory
  • Export all the files present in subdirectories under the abc_dir directory

Ensure that the files mentioned in the customer.custom file are not specified in the exclude file.
For more information about the exclude file, refer to the section Editing the Exclude File.

To edit the customer.custom file from the Web UI:

  1. On the Web UI, navigate to Settings > System > Files.

  2. Click Edit beside to the customer.custom file.
    The following is a snippet listing the sample settings for exporting a directory.

    #To include all the files present in the abc directory
    /opt/test/abc_dir/*
    #To include all the files in the subdirectories present in the abc_dir directory
    recursive:/opt/test/abc_dir
    

    If you have a Key Store configured with ESA, then you can export the Key Store libraries and files using the customer.custom file. The following is a sample snippet listing the settings for exporting a Key Store directory.

    #To include all the files present in the Safeguard directory
    /opt/safeguard/*
    #To include all the files present in the Safenet directory
    /usr/safenet/*
    

    The following is a sample snippet listing the settings for exporting the self-signed certificates.

    #To include all the files present in the Certificates directory
    /etc/ksa/certificates
    
  3. Click Save.

Editing the customer.custom File to include files

The library files and other settings that are not exported using the cluster export task can be addressed using the customer.custom file.

Ensure that the files mentioned in the customer.custom file are not specified in the exclude file.
For more information about the exclude file, refer to the section Editing the Exclude File.

To edit the customer.custom file from the Web UI:

  1. On the Web UI, navigate to Settings > System > Files.

  2. Click Edit beside to the customer.custom file.
    If you have a Key Store configured with ESA, then you can export the Key Store libraries and files using the customer.custom file. The following is a sample snippet listing the settings for exporting a Key Store directory.

    #To include all the files present in the Safeguard directory
    /opt/safeguard/*
    #To include all the files present in the Safenet directory
    /usr/safenet/*
    

    The following is a sample snippet listing the settings for exporting the self-signed certificates.

    #To include all the files present in the Certificates directory
    /etc/ksa/certificates
    
  3. Click Save.

Editing the exclude files

The exclude file contains the list of system files and directories that you don’t want to export. You can access the exclude file from the CLI Manager only. The exclude file is present in the /opt/ExportImport/filelist directory.

  • A user which has root privileges is required to edit the exclude file, as it lists the system directories that you cannot import.
  • If a file or directory is present in both the exclude file and the customer.custom file, then the file or directory is not exported.

The following directories are in the exclude file:

  • /etc
  • /usr
  • /sys
  • /proc
  • /dev
  • /run
  • /srv
  • /boot
  • /mnt
  • /OS_bak
  • /opt_bak

The list of files mentioned in the exclude file affect only the customer.custom file and not the standard cluster export tasks.

If you want to export or import files, then ensure that these files are not listed in the exclude file.

To edit the exclude file:

  1. On the CLI Manager, navigate to Administration > OS Console.
  2. Navigate to the /opt/ExportImport/filelist/ directory.
  3. Edit the exclude file using an editor.
  4. Perform the required changes.
  5. Save the changes.
Last modified January 30, 2025