WinRAR Home About Download Customers Buy Now Add-ons News Knowledge Report
Home / News / A backup script that actually restores: archiving from the command line
Guides

A backup script that actually restores: archiving from the command line

Five lines of scripting turn a manual zip-everything habit into a dated, verifiable backup you can restore in one command.

A backup script that actually restores: archiving from the command line

Most backup advice fails at the restore step. A script that only creates archives is half a script; the other half tests that the archive can be read back.

The pattern

Use a dated archive name, a recovery record, a password from a file rather than the command line, and a test pass at the end.

Why the test pass matters

Disk errors often appear while writing, not while reading. A test immediately after creation catches a truncated archive the same evening instead of six months later when you need it.

Rotation without thinking

Keep seven daily archives and four weekly ones; delete by age, not by name. If your backup fits on one external drive, keep a second drive that is only connected during the backup window.

Restore drill

Once a quarter, restore a folder to a scratch directory and open a file from it. The drill takes ten minutes and is the only real proof that the script works.

← All articles
  Buy Download Add-ons News Register guide
Copyright   WinRAR