OpenTTM

Documentation › Reference

OpenTTM Snapshots

OpenTTM Snapshots is a small, separate program that takes a snapshot of your computer’s main drive every hour. If you delete the wrong file, or save over your trial data file, you can open the folder as it was an hour ago, or yesterday, and copy the file back out.

It works with any file on drive C:, not only OpenTTM’s. It is free, and it is a separate download from OpenTTM itself.

Note

A snapshot is not a backup. Snapshots are kept on the same drive as your files, so they undo mistakes but will not survive a failed drive or a lost laptop. Keep copying your trial data file somewhere else after each trial as well.

Installing it

Download openttm-snapshots-setup from the download page and run it.

  • Windows will ask for administrator permission. Taking snapshots needs it. OpenTTM itself does not, which is why this is a separate installer.

  • Windows 10 or 11, 64-bit. It is not affected by which version of Microsoft Access you have.

  • It takes the first snapshot as it installs, which takes a few seconds, and then one every hour while the computer is on.

There is nothing to set up. If the drive is nearly full the installer says so and does not switch snapshots on; see Disk space.

Getting a file back

  1. Close OpenTTM, or whichever program uses the file. A trial data file must not be open while you put an older copy in its place.

  2. In File Explorer, right-click the right thing:

    • a file you saved over or damaged: right-click the file itself;

    • a file you deleted: right-click the folder it was in.

  3. Choose Properties, then the Previous Versions tab.

  4. Pick a time from before the mistake and click Open. A window opens showing the folder exactly as it was then.

  5. Copy the file you need out of that window and paste it back into the real folder.

Note

Copy rather than Restore. The Restore button puts the whole folder back as it was, replacing everything you have done since. Copying the one file you need, or choosing Restore To… from the arrow beside the button, leaves your current work alone.

The list only shows a snapshot if the file or folder you right-clicked has changed since it was taken, and only the times when it changed. A file you have not touched for a week shows one entry, not a hundred and sixty-eight.

That has two consequences worth knowing:

  • Right-clicking the folder does not find a file you saved over. A folder counts as changed only when a file in it is added, deleted or renamed. Saving over a file, which is what happens to a trial data file all day, changes the file and not its folder, so the folder shows nothing for it.

  • Straight after installing, the list is usually empty. There is only one snapshot, and nothing has changed since it was taken. To see that it is working, create a new file in a folder such as Documents, then look at that folder’s Previous Versions.

Checking that it is working

Choose OpenTTM Snapshots from the Start menu. A window shows:

Line

What it means

Last snapshot

when the most recent one was taken

Snapshots kept

how many there are, and how far back they go

Space used

how much of the drive they use, against the limit set when it was installed

It warns you if the last attempt failed, saying why, or if no snapshot has been attempted for more than three hours. A computer that was switched off or asleep takes one snapshot as soon as it wakes, so a warning straight after a weekend away clears itself within the hour.

How long snapshots are kept

  • Every snapshot from the last 36 hours, so you can go back to any hour of today or yesterday.

  • Then one a day for 14 days, the last one taken that day.

That is about fifty snapshots at any time. Older ones are deleted automatically.

Disk space

A snapshot does not copy your files. It records what the drive looked like, and from then on keeps the old version of anything that changes. So it costs space in proportion to how much you change, not how much you have. How much that is varies a great deal from one computer to the next; the status window shows what yours is using.

When it installs, it limits the space snapshots may use to a tenth of the drive, or half the free space if that is less. If you had already given Windows’ own System Protection more than that, it is left alone. If that would come to under 2 GB, the drive is too full for snapshots to be worth taking, and the installer tells you so rather than switching them on.

When snapshots reach the limit, Windows deletes the oldest ones to make room, so on a computer that changes a lot of data they may not reach back the full two weeks. If the limit is later cut below what the installer set, the status window says so.

Removing it

Windows Settings –> Apps, find OpenTTM Snapshots, and choose Uninstall. That stops the hourly snapshots and deletes the ones this program took. Windows’ own restore points are not touched.

Technical details

This section is for anyone who wants to know what the program actually does to their computer. None of it is needed to use it.

What a snapshot is

OpenTTM Snapshots uses the Volume Shadow Copy Service (VSS), the part of Windows that System Restore and most backup software are built on. Creating a snapshot takes a few seconds, measured at around six on a typical laptop, while Windows asks the programs that register with VSS to bring their files to a consistent state. Writes to the drive are held only for a moment within that.

Nothing is copied when the snapshot is taken. From then on, the first time any block of the drive is changed, VSS saves the old block in a reserved area first. That is why snapshots are quick to take, cost space in proportion to change, and slow writes only slightly. Only the newest snapshot pays that cost; older ones share what was saved.

A snapshot is crash-consistent. A file that was open and being written when the snapshot was taken comes back as if the power had gone off at that moment. For an Access database that is almost always recoverable, and much better than a copy made while it was being written. Closing OpenTTM before the hour is not necessary, but a snapshot of a closed database is a clean one.

These are the same snapshots Explorer’s Previous Versions tab has always shown; Windows simply does not take them on a schedule by itself.

The hourly task

Installing it registers a Task Scheduler task called OpenTTM Snapshots:

  • runs openttm-snapshots.exe run every hour, as SYSTEM, because creating a snapshot needs administrator rights;

  • runs on battery;

  • after the computer has been asleep or off, runs once when it next can, rather than once for every hour missed;

  • never runs twice at the same time, and is stopped if it takes more than ten minutes.

You can see it in Task Scheduler, and you will see the snapshots it takes in any tool that lists shadow copies, such as vssadmin list shadows from an administrator command prompt.

Retention, and the limit of 64

Windows keeps at most 64 snapshots per drive. When there are 64 and another is taken, Windows deletes the oldest itself, and the oldest might be a System Restore point. Keeping 36 hourly and 14 daily, about 50 in all, leaves room for the restore points Windows makes around updates.

Each run takes a snapshot first and then deletes those of its own that fall outside that rule.

It only deletes its own snapshots

Windows does not record which program created a snapshot, so OpenTTM Snapshots keeps its own list, and only ever deletes snapshots on that list. Restore points and snapshots made by backup software are never touched.

That list is the thing that must not be tampered with, so the folder it lives in can be changed only by administrators and SYSTEM. Everyone else can read it, which is how the status window works without asking for permission.

C:\ProgramData\OpenTTM Snapshots\

File

settings.txt

the drive, how long to keep snapshots, and the space limit set at install

snapshots.txt

the list of snapshots this program made

status.txt

the outcome of the last run, which the status window reads

log.txt

one line for every snapshot taken and deleted, and every failure

Uninstalling deletes the first three and keeps log.txt, so there is still a record of what was done.

The space limit

The limit is the same setting as Max Usage under System Protection (Start, type restore point, Configure…). Moving that slider changes the limit for snapshots and restore points alike.

Windows can also change the limit by itself. On one laptop with System Protection on, a limit of 47.6 GB set at install was back at 2%, 9.5 GB, the next morning, with nothing in this program’s log; on another it held. What reset it is not yet known. The installer records the limit it left in settings.txt, so the status window can tell when it has been cut.

From the command line

From an administrator command prompt, in C:\Program Files\OpenTTM Snapshots:

openttm-snapshots status      what the window shows, as text
openttm-snapshots run         take a snapshot now
openttm-snapshots install -keep-hours 24 -keep-days 20
openttm-snapshots uninstall   stop, and delete this program's snapshots
openttm-snapshots version     which version is installed

install can be run again to change how long snapshots are kept. The two numbers must add up to less than 56, for the reason given above.

These commands refuse to run without administrator rights. That is a safeguard, not a formality: without them, Windows answers a request for the list of snapshots with an empty list rather than an error. A program taking that at face value would conclude that its snapshots had all disappeared, forget them, and never tidy them up again.

What it does not do

  • It does not send anything anywhere. It makes no network connections.

  • It protects only drive C:. Files on a USB drive or a network share are not included.

  • It cannot bring back a file that was created and deleted between two snapshots.