UNIBASE

ubChecksum: How to verify Unibase Server Files

ubChecksum is a command-line tool used to compare the checksums of files between a development server (where the command is run) and a specified production server.

It allows users to compare:

  • The entire application.
  • A specific directory within the application.
  • A particular file within the application.
  • A file or directory located outside the application using an absolute path.

The tool can either display the differences between the files using diff -u or simply list the names of the files that have different checksums. The --server argument is mandatory and specifies the production server to compare against. The --app argument is optional and allows specifying an application other than the one defined by the $UG_APP environment variable.

SYNOPSIS

ubChecksum {–app <application>} {–dir <directory>} {–file <file>} {–path <absolute path>} {–list} –server <server to compare>}

DESCRIPTION

ubChecksum does a checksum comparison of files on the current server (assumed to be development) and a production server.

Optionally it can also display the difference between the files (using diff -u).

ARGUMENTS

  • –app <application>
    • optional. Specifies the application if not the one defined in $UG_APP
  • –dir <directory>
    • Optional. Director to compare if not not comparing the entire application
  • –file <file>
    • Optional. File in application to compare if not comparing the entire application
  • –path <absolute path>
    • Optional. Absolute path to file or directory outside the application
  • –list
    • Optional. Only list the names of files that are different, not the diff listings
  • –server <server to compare>
    • Required. Compare files on this server.

The ubChecksum function is useful for several key reasons:

  • Ensuring Consistency Between Environments: It helps verify that the files in a development environment are identical to those in a production environment. This is crucial for ensuring that code and configurations deployed to production are the same as what was tested.
  • Identifying Deployment Issues: If there are discrepancies in file checksums, it can indicate problems during the deployment process, such as incomplete file transfers, corrupted files, or incorrect versions being deployed.
  • Debugging and Troubleshooting: When issues arise in production, comparing files with the development environment can help pinpoint whether the problem is due to code differences or other environmental factors.
  • Version Control Awareness: While not a replacement for dedicated version control systems, ubChecksum provides a quick way to check if unintended modifications have occurred on either server.
  • Auditing and Compliance: In some cases, ensuring the integrity and consistency of application files across different environments is important for auditing and compliance purposes.
  • Efficient Comparison: Instead of manually comparing potentially large numbers of files, ubChecksum automates the process using checksums, which are efficient summaries of file content. The option to only list differing files or to see the detailed differences via diff -u further enhances its utility.
  • Flexibility: The tool allows comparison at different levels (entire application, specific directories, individual files, or even files outside the application), providing flexibility for various use cases.

In essence, ubChecksum helps maintain the integrity and consistency of the Unibase application across different server environments, which is vital for reliable software development, deployment, and operation.

Verified by MonsterInsights