Automatically Verify File Integrity Using Hash Values

IT EngineersDevelopers

Getting Started

Basic Concept

Compare hash values before and after transfer to verify that the destination file matches the source

After transferring a file to another server or storage system, a completed transfer status alone may not be enough to confirm that the file contents were preserved correctly.

For example, even if a large dataset, backup file, or critical result file appears on the target system after transfer, you may still need to verify that the source and destination contents are identical and that the file was not changed or corrupted during transfer.

A hash value is calculated from file contents. The same file produces the same hash when calculated using the same method, so comparing the source and destination hash values can verify whether the two files are identical.

If hashes are calculated separately on the source and destination after every transfer, however, the transfer and verification jobs must be run separately, and each file may require its own verification result when multiple files are involved.

With INNORIX Flow, you can connect integrity verification to the transfer result and build an automated verification flow that calculates and compares hash values for the source and destination files.

Instead of checking only whether the file reached the Target, you can verify integrity through a complete flow of source file review → hash calculation → file transfer → destination file review → hash calculation → comparison result.

text
Original File
      │
      ▼
Hash Calculation
    SHA-256
      │
      ▼
 Original Hash
      │
      │ File Transfer
      ▼
Destination File
      │
      ▼
Hash Calculation
    SHA-256
      │
      ▼
Destination Hash
      │
      ▼
 Hash Comparison
      │
 ┌────┴─────┐
 ▼          ▼
Match    Mismatch
 │          │
 ▼          ▼
Verified    Review

Rather than treating hash verification as a separate manual check, you can configure it to continue automatically from the transfer result and verify integrity for each file.

This also applies to transfers with multiple files, allowing you to review each verification result and distinguish files that match successfully from files that require additional review.

Verification ResultMeaning
MatchSource and destination hash values are identical
MismatchHash values differ and require additional review
Verification CompleteBoth transfer and file verification are complete
Review RequiredThe file or transfer result requires additional review

This connects the full integrity-check process from file transfer → destination file review → hash calculation → source comparison → verification result within one Flow.

Verification Flow

Continue automatically from transfer completion to integrity verification

Hash verification can be configured to check the file once before transfer and again after transfer.

Use the source-file hash as the reference value and compare it with the hash of the transferred destination file.

StageProcessingResult
Source ReviewIdentify the file to transferDetermine the verification target
Generate Reference ValueCalculate the source-file hashCreate the reference hash
File TransferTransfer from Source to TargetCreate the destination file
Destination ReviewCalculate the destination-file hashCreate the comparison value
Compare ValuesCompare source and destination hashesDetermine whether they match
Record ResultStore the verification resultComplete or require review
text
Source File
   │
   ▼
Generate Reference Hash
   │
   ▼
File Transfer
   │
   ▼
Destination File Applied
   │
   ▼
Generate Destination Hash
   │
   ▼
Compare Source ↔ Destination
   │
 ┌─┴────────────┐
 │              │
 ▼              ▼
Verification Complete       Mismatch Detected
                │
                ▼
             Review Cause

This flow verifies not only whether the transfer completed, but also whether the actual file contents are identical.

Application Scope

Apply verification only where needed based on file importance and characteristics

Not every file requires the same level of verification.

For large datasets, database backups, media masters, deployment files, and other files where corruption could affect downstream work, hash verification can be connected to the transfer job.

text
Transfer Targets
    │
    ├── Standard Work Files
    │       └── Review Transfer Result
    │
    ├── DB Backup
    │       └── Transfer + Hash Verification
    │
    ├── Deployment Files
    │       └── Transfer + Hash Verification
    │
    └── Large Source Files
            └── Transfer + Hash Verification

For example, hash verification can be used in the following environments.

File TypeHow Hash Verification Is Used
DB BackupVerify integrity of remotely stored backup files
Software Deployment FileConfirm destination servers received an identical file
Media MasterVerify results of large-file transfers
Data ArchiveConfirm file integrity before long-term storage
Critical Business DataDetect changes or corruption during transfer

IT Engineers

Verification Criteria

Configure the hash method and verification scope based on file characteristics

First, define which files should be verified and how their hash values will be compared.

Depending on the transfer environment, you can verify every file or only files matching specific paths, extensions, or size thresholds.

For example, you can define the verification scope as follows.

text
Source Path
/data/backup
       │
       ▼
File Filter
*.sql
*.dump
*.tar
       │
       ▼
Hash Verification
       │
       ├── SHA-256
       │
       └── Selected Files

The verification criteria can include the following settings.

SettingConfiguration
Verification TargetAll files or selected files
File ConditionsPath, name, and extension
Hash MethodAlgorithm used consistently for both files
Verification TimingBefore transfer, after transfer, or at completion
Result HandlingNext action based on match or mismatch

This makes integrity verification part of the transfer criteria for selected files rather than a separate task from standard file transfer.

Create Baseline

Record the source-file hash as the verification baseline

When verification starts, first calculate the hash of the source file.

This value becomes the reference used to compare the destination file.

text
Source

/backup
   │
   ├── db_01.dump
   │       │
   │       ▼
   │   SHA-256
   │       │
   │       ▼
   │   8F3A...C21
   │
   └── db_02.dump
           │
           ▼
       SHA-256
           │
           ▼
       A71D...E09

When multiple files are transferred together, a separate baseline can be generated for each file and compared with its destination copy.

This lets you distinguish cases where the overall transfer completed but an individual file still requires review.

Connect file transfer completion and hash comparison in one Flow

After the source hash is ready, run the file transfer and continue with verification after the destination file is applied.

Hash verification can be configured as an independent check or as a follow-up stage that runs automatically after transfer completion.

text
┌───────────────┐
│ Source File   │
└───────┬───────┘
        │
        ▼
┌───────────────┐
│ Generate Hash │
└───────┬───────┘
        │
        ▼
┌───────────────┐
│ File Transfer │
└───────┬───────┘
        │
        ▼
┌───────────────┐
│ Target File   │
└───────┬───────┘
        │
        ▼
┌───────────────┐
│ Verify Hash   │
└───────────────┘

This structure can be used for the following scenarios.

  • Verify remote backup integrity after file transfer

  • Check integrity on each target after distributing deployment files to multiple servers

  • Compare checksums per file after large-data transfer completes

  • Confirm source and stored files are identical before long-term retention

Compare Results

Review per-file hash values and the overall verification result together

After transfer and verification complete, review the overall execution result in Runs.

Verification should not be shown only as a transfer success result. Review it based on the per-file hash comparison result as well.

text
Verification Run

┌──────────────────────────────────┐
│ File             Verification    │
├──────────────────────────────────┤
│ db_01.dump       ✓ Match        │
│ db_02.dump       ✓ Match        │
│ archive_01.tar   ✓ Match        │
│ backup_03.dump   ! Mismatch     │
└──────────────────────────────────┘

Verification results can be categorized as follows.

ResultMeaningNext Action
MatchSource and destination files are identicalVerification complete
MismatchHash values are differentReview file state
Verification FailedThe verification job itself did not completeReview the environment
PendingVerification is waiting to runCheck job progress

This distinguishes a completed transfer from a transfer whose file verification is still pending.

Mismatch Response

Review only files with mismatched hashes and rerun the required work

If the source and destination hash values differ, review the transfer status and the Source and Target environments for that file.

When only some files are affected, review the cause and rerun only the required work for failed verification files instead of rerunning the entire job.

text
Hash Mismatch
      │
      ▼
Review Per-File Results
      │
      ├── Source File
      │
      ├── Target File
      │
      ├── Transfer Result
      │
      └── Hash Value
              │
              ▼
        Review Cause
              │
              ▼
            Retry
              │
              ▼
         Hash Recheck
              │
         ┌────┴────┐
         ▼         ▼
       Match    Mismatch
         │
         ▼
     Verified

When a mismatch occurs, review the following items.

ItemDetailsResponse
Source FileWhether the file changedGenerate a new baseline
Target FileWhether it was applied correctlyReview file state
Transfer HistoryWhether an error occurred during transferReview Run details
Storage PathWhether the wrong file was comparedReview Target path
Verification MethodWhether both hashes used the same methodReview hash settings

With this recipe, you can automate the entire flow from source file review → hash generation → file transfer → destination file review → checksum comparison → per-file verification result recording → mismatch review.

This verifies not only that the file reached the destination system, but also that it arrived in the same state as the source.