Skip to main content

150GB in Under 3 Minutes: A Restic Shoutout

You know what’s surprisingly not terrible? Backing up databases.

Wait, let me rephrase: You know what’s surprisingly not terrible when you use the right tool? Backing up databases.

The Numbers

150GB MSSQL data directory. 2 minutes and 57 seconds. Done.

Not hours. Not “let it run overnight.” Not “come back after lunch.” Under three minutes for production database files.

The Tool: Restic

Restic is one of those rare pieces of software that just works. Open source backup program that handles deduplication, encryption, compression, and verification without a PhD thesis worth of configuration.

  • Fast - Parallel processing, smart chunking, efficient compression
  • Encrypted by default - Because we’re not animals
  • Deduplication - Only backs up what changed
  • Cross-platform - Linux, Windows, macOS, BSD
  • Multiple backends - Local, SFTP, S3, Azure, you name it
  • Simple CLI - No XML config files

GitHub: restic/restic Docs: restic.readthedocs.io

Ten Years of Production Use

This is literally the simplest backup script possible, and I’ve been running it for over ten years. Multiple restores. Multiple data migrations. Zero disasters.

@echo off

REM === CONFIGURATION - CHANGE THESE VALUES ===
set RESTIC_REPOSITORY=\\backup-server\datev-backups
set RESTIC_PASSWORD=your-password-here
set DATEV_DATA_DIR=L:\WINDVSW1
REM ==========================================

REM Stop DATEV SQL Server
echo Stopping SQL Server...
net stop "MSSQL$DATEV_DBENGINE" /y

REM Wait a bit for files to be released
timeout /t 10

REM Run restic backup
echo Running backup...
restic -r %RESTIC_REPOSITORY% backup "%DATEV_DATA_DIR%"

REM Start DATEV SQL Server
echo Starting SQL Server...
net start "MSSQL$DATEV_DBENGINE"

echo Backup complete!
pause

Thirteen lines. Stop service. Wait 10 seconds. Backup. Start service. Done.

This script has survived multiple Windows Server upgrades, hardware migrations, storage changes, and countless DATEV updates. It works because there’s nothing to break.

Why It’s Fast

Deduplication is the secret sauce. First backup of 150GB takes a while. Second backup where only 5GB changed? Under three minutes.

MSSQL files are huge, but day-to-day changes are relatively small. Restic only saves the blocks that changed. This is why it destroys traditional backup tools for database files.

The Restic Workflow

# Initialize a repository (one time)
restic init --repo /path/to/backup

# Backup
restic backup /data --repo /path/to/backup

# List snapshots
restic snapshots --repo /path/to/backup

# Restore
restic restore latest --repo /path/to/backup --target /restore/path

# Check integrity
restic check --repo /path/to/backup

# Cleanup old snapshots
restic forget --keep-last 10 --prune --repo /path/to/backup

The Track Record

Over a decade of production use. I’ve actually had to restore from these backups—multiple times, for migrations and recovery scenarios. Every single time, Restic delivered.

No corruption. No incomplete snapshots. No “upgrade to Enterprise Edition” nonsense.

It just works. Which in the backup world is about as rare as finding a bug-free Microsoft update.

The Bottom Line

150GB. 2:57. Thirteen-line batch file. Ten years of production use. Multiple successful restores.

Restic is fast, reliable, encrypted, free, and doesn’t make you want to throw your computer out a window.

If you’re backing up databases and not using Restic, you’re either using something enterprise and expensive that’s probably slower, or not backing up at all (please fix this immediately).

Go download Restic. Set up automated backups. Sleep better at night.


P.S. - Seriously, if you’re not backing up your databases, stop reading and go set that up right now. I’ll wait.