How to Recover Corrupted TallyPrime Company Data: Complete Guide
How to Recover Corrupted TallyPrime Company Data: Complete Guide
Step-by-step guide to repairing and recovering corrupted TallyPrime company data. Learn to use the native rewrite tool, recover from backup, and fix Tally.rec errors.
Who is this for: Tally Guides
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.
- 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). - Open the data folder in Windows File Explorer.
- Locate your company folder. Tally folders are named with a 5-digit number (e.g.
10000,10001). - 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:
- Launch TallyPrime. On the startup screen (before opening any company), press Ctrl + Alt + R.
- TallyPrime opens a special Rewrite Company screen showing a list of all registered companies on the system.
- Select the corrupted company from the list and press Enter.
- The system will display the prompt: "Rewrite? Yes or No". Select Yes.
- TallyPrime will ask: "Backup before rewriting? Yes or No". Select Yes and specify a folder path to save a pre-rewrite backup copy.
- 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.
- 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:
- Close TallyPrime completely.
- Open the affected company folder (e.g.
10000) in Windows Explorer. - Check if a file named
Tally.recexists. If present, it contains the unsaved transaction states that crashed the system. - Copy
Tally.rec, paste it into the same folder, and rename the copy toTally.reg(orTally.tsfdepending on the database structure version). - 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:
- Locate your backup zip file (named like
TBK900_10000.zip) on your computer or cloud storage. - Go to TallyPrime and select Alt + Y (Data) > Restore.
- In the Restore screen, set the Destination Path to your active Tally data folder.
- Set the Source Path to the directory containing your backup zip file.
- 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 Name | Role in Database | Corruption Danger |
|---|---|---|
Company.900 | Main database file containing all transactions | High (if corrupted, data recovery is difficult) |
Tally.tsf | Index file mapping ledger addresses | Medium (easily repaired by Rewrite tool) |
Tally.rec | Temporary recovery buffer used during active saves | Low (used to restore crashed sessions) |
tally.ini | Local configuration settings file | Low (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.900database 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.
Chartered Accountant & Accounting Automation Specialist