Back to Blog|Tally Guides

How to Recover Corrupted TallyPrime Company Data: Complete Guide

July 2, 202613 min readCA Rakesh Sharma

A corrupted TallyPrime database is a nightmare scenario for any finance team. Database corruption typically manifests when attempting to load a company, resulting in error codes such as "Error: Company data is corrupted", TallyPrime closing automatically during startup, or specific vouchers showing blank details.

These issues are usually caused by sudden power cuts while TallyPrime is writing a transaction, network drops on a multi-user LAN setup, or virus infections. TallyPrime includes a variety of built-in recovery tools to resolve database errors. This guide explains how to run the native rewrite tool, restore corrupted files from background backups, use recovery files, and prevent database corruption.

1. The First Step: Create a Manual Backup of Corrupted Files

Before running any repair utilities, you must create a backup of your corrupted data folder. The repair process involves rewriting database tables, and if the process is interrupted or fails, it can cause irreversible data loss.

  1. Locate your TallyPrime data folder path. You can find this path on the startup screen under the Company list (e.g. C:\Users\Public\TallyPrime\Data).
  2. Open the data folder in Windows File Explorer.
  3. Locate your company folder. Tally folders are named with a 5-digit number (e.g. 10000, 10001).
  4. Right-click the folder, select Copy, and paste it to a safe secondary location (like your Desktop or an external USB drive). Name this folder "Corrupted Data Backup".

2. Method 1: Using TallyPrime's Native Rewrite Tool (Ctrl + Alt + R)

The primary built-in repair utility is the Rewrite Tool. This scans the database schema and rebuilds index files:

  1. Launch TallyPrime. On the startup screen (before opening any company), press Ctrl + Alt + R.
  2. TallyPrime opens a special Rewrite Company screen showing a list of all registered companies on the system.
  3. Select the corrupted company from the list and press Enter.
  4. The system will display the prompt: "Rewrite? Yes or No". Select Yes.
  5. TallyPrime will ask: "Backup before rewriting? Yes or No". Select Yes and specify a folder path to save a pre-rewrite backup copy.
  6. The rewrite process begins. A progress bar displays the status of ledger tables and transaction entries being rebuilt. Do not close TallyPrime or shut down the computer during this process.
  7. Once complete, TallyPrime will load the company automatically. Verify your Balance Sheet and Trial Balance to confirm data is restored.

3. Method 2: Rebuilding from Tally.rec Recovery Files

If the database crashed during a transaction save, TallyPrime creates a recovery file named Tally.rec inside the company data folder:

  1. Close TallyPrime completely.
  2. Open the affected company folder (e.g. 10000) in Windows Explorer.
  3. Check if a file named Tally.rec exists. If present, it contains the unsaved transaction states that crashed the system.
  4. Copy Tally.rec, paste it into the same folder, and rename the copy to Tally.reg (or Tally.tsf depending on the database structure version).
  5. Launch TallyPrime and attempt to load the company. The application will detect the recovery file and reconstruct the missing transaction records automatically.

4. Method 3: Restoring TallyPrime Auto-Backups

If both the Rewrite tool and `Tally.rec` methods fail, you must restore your last clean backup. TallyPrime creates automatic zip backups under the folder path configured in your backup settings:

  1. Locate your backup zip file (named like TBK900_10000.zip) on your computer or cloud storage.
  2. Go to TallyPrime and select Alt + Y (Data) > Restore.
  3. In the Restore screen, set the Destination Path to your active Tally data folder.
  4. Set the Source Path to the directory containing your backup zip file.
  5. Select the company from the list and click Restore. Confirm the overwrite prompt to replace the corrupted folder with the clean backup copy.

5. What Causes Data Corruption (And How to Prevent It)

Preventing database corruption is more effective than trying to repair it after it happens. Common causes include:

  • Sudden Power Cuts: If the computer running the Tally server shuts down during transaction write operations, index files will corrupt. Always use an Uninterruptible Power Supply (UPS) for your Tally server.
  • Wi-Fi Connection Drops: Working in TallyPrime over Wi-Fi is highly discouraged in multi-user setups. Minor signal drops will interrupt transaction saves. Always connect Tally clients to the server using physical Cat6 Ethernet cables.
  • Antivirus Interruptions: Antivirus software scanning Tally files during read/write cycles can lock database handles. Ensure you configure directories in your antivirus exclusions.

6. TallyPrime Database Files Breakdown

File NameRole in DatabaseCorruption Danger
Company.900Main database file containing all transactionsHigh (if corrupted, data recovery is difficult)
Tally.tsfIndex file mapping ledger addressesMedium (easily repaired by Rewrite tool)
Tally.recTemporary recovery buffer used during active savesLow (used to restore crashed sessions)
tally.iniLocal configuration settings fileLow (can be deleted and re-created)

7. Automated Database Integrity Checks

Regular automated validation scans help identify transaction data discrepancies before they develop into full database corruption. Set up a weekly scheduler on your Tally server to verify:

  • Running the Verify Tool: Go to Gateway of Tally > Display More Reports > Statement of Accounts > Data Analysis > Verification of Chart of Accounts. This scans for structural anomalies in ledger hierarchies.
  • Scheduling disk chkdsk: Run a weekly disk checking command (chkdsk C: /f) on the Tally server server operating system to verify that the storage sectors containing your databases are free of hardware sector failures.

8. When to Call Authorized Tally Support

If the Rewrite tool finishes with errors, or if TallyPrime crashes instantly upon loading the company directory, the database indexes are corrupted. In these advanced scenarios:

  • Do not attempt to open the Company.900 database file in hex editors or manual text tools. This can alter structural checksum headers, rendering the file unrepairable.
  • Contact an Authorized Tally Partner or Tally Solutions corporate support. They possess proprietary database rebuilding tools that can isolate corrupted transaction sectors and salvage the remaining clean data.

9. Restoring Internal Configurations from tally.ini

If your company loads fine but you experience unexpected printing or startup glitches after a crash, local ini parameters might be corrupted. Navigate to the Tally installation folder, delete tally.ini, and restart TallyPrime. The system automatically creates a clean tally.ini file with default configuration parameters, restoring standard application performance without affecting transaction data.

Protect Your Data with Secure Cloud Integrations

TrulyInvoice interfaces with TallyPrime via api-based cloud connectors, eliminating the risks of database corruption caused by network drops or power outages.

Start 14-Day Free Trial

C
CA Rakesh SharmaExpert Reviewer

Chartered Accountant & Accounting Automation Specialist

Last Verified: July 2, 2026
TallyPrime FY 2026-27 (v4.0+)
Ready to save time?

Stop Manual Voucher Entry.

TrulyInvoice automates your complete invoice workflow and syncs directly to Tally Prime.

No credit card · 14-day free trial

01

Upload Invoice

Drag & drop PDFs, scans, or photos.

02

AI Extraction

Line items, tax, and ledgers mapped.

03

1-Click Review

Verify extracted details on dashboard.

04

Direct Sync

Vouchers created instantly in Tally Prime.

Chat with us