DATOMILAB

Business software

How to back up Tally data automatically

Find your TallyPrime data folder, back it up safely on a schedule, keep an off-site copy in Google Drive, and test that the backup opens.

Updated 27 Sep 2026 6 min read By the DatomiLab team

TallyPrime keeps each company's data as files in a data folder on disk. Backing it up means copying that folder safely, on a schedule, to at least one place other than the Tally computer. Here is how to do it reliably, and how to check the backup opens.

Step 1: find your Tally data folder

The location varies by version and by how Tally was installed. Do not guess. Check it in TallyPrime: open Help (F1) > Settings > Data Configuration, and note the Location of Company Data.

Inside it, each company is a folder with a number for a name, such as 100000. Back up the whole data folder, not just one company, so nothing is missed when a new company is created.

Step 2: use Tally's own backup for manual copies

TallyPrime has a built-in backup under Data (Alt+Y) > Backup. It creates a consistent backup file that restores with Data > Restore. Use it before year-end closing, before an upgrade, or before any bulk change. Its limit is that someone has to remember to run it.

Step 3: automate a nightly copy

Copying the data folder while Tally is writing to it can capture half-finished files. The safe approach for an automatic copy is to run it when Tally is closed, for example at night. This PowerShell script checks Tally is not running, copies the data folder to a dated folder, and keeps 30 days.

C:\Scripts\tally_backup.ps1
$src  = 'C:\Users\Public\TallyPrime\data'   # use the path from Data Configuration
$root = 'E:\TallyBackup'
$keep = 30

# TallyPrime runs as tally.exe (confirm in Task Manager)
if (Get-Process -Name tally -ErrorAction SilentlyContinue) {
    Add-Content "$root\backup.log" "$(Get-Date -f s) SKIPPED: Tally is running"
    exit 1
}

$dst = Join-Path $root (Get-Date -Format 'yyyy-MM-dd')
robocopy $src $dst /E /R:2 /W:5 /NP /LOG+:"$root\robocopy.log" | Out-Null
if ($LASTEXITCODE -ge 8) {
    Add-Content "$root\backup.log" "$(Get-Date -f s) FAILED: robocopy code $LASTEXITCODE"
    exit 1
}
Add-Content "$root\backup.log" "$(Get-Date -f s) OK: $dst"

Get-ChildItem $root -Directory |
    Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-$keep) } |
    Remove-Item -Recurse -Force

Robocopy exit codes below 8 mean success; 8 and above mean some files failed. Replace the $src path with the one from step 1, and E:\ with a second disk or USB drive.

Schedule it for a time the office is closed:

Command prompt (run as administrator)
schtasks /Create /TN "Tally nightly backup" ^
  /TR "powershell -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\tally_backup.ps1" ^
  /SC DAILY /ST 23:30 /RU "%USERNAME%" /RP *
If Tally stays open overnight

The script skips the copy and logs it, rather than taking a risky copy. Ask users to exit Tally at day end, or run the scheduled task a little after your usual closing time.

Step 4: keep a copy off the premises

A second disk in the same PC does not help if the PC is stolen or hit by ransomware. Add an off-site copy: a Google Drive folder, an FTP server, or a USB drive taken home weekly and rotated. The Google Drive guide shows how to upload a backup folder automatically, and the same method works for Tally backups. Accounting data is sensitive, so encrypt it before it leaves the office.

Step 5: test that the backup opens

Once a month, copy one day's backup folder to a test location on another PC. Point TallyPrime at it through Data Configuration, and open a company. Check the latest vouchers are there. A backup you have opened is one you can trust.

Checklist

  • Data folder location confirmed from Data Configuration.
  • Nightly copy running while Tally is closed.
  • 30 days of local copies on a second disk.
  • Off-site copy, encrypted.
  • Monthly test of opening a company from backup.
  • Manual Tally backup before year-end and upgrades.

With Velocity

Velocity backs up files and folders, including a Tally data folder, on a daily, weekly or monthly schedule through a background service. Send each backup to a local drive and Google Drive or FTP/FTPS in one job, with include and exclude rules, retries and an email after each run.