Have you ever experienced this moment? You're sitting at your dashboard in the evening, „just for a moment“ changing a line in your configuration.yaml or in a complex automation system - and suddenly nothing works anymore. The screen turns red, error messages fly around your ears, or worse: the automation that has been running perfectly for months simply stops working. away or overwritten.

The classic Home Assistant backup is great, but it's often like shooting sparrows with cannons. Do you really want to restore the entire system from tonight at 3:00 a.m. and lose all the data (energy consumption, statuses) from the last 12 hours just because you have one file messed up?

Here comes the Home Assistant Time Machine into play.

In this ultimate guide, I'll show you how to install, configure and use this ingenious tool. We'll look at installing it as an add-on (the easiest method) and as a standalone container (for the Docker pros).

For detailed instructions and explanations of all configuration options, I recommend watching the YouTube video linked below. This video goes into detail about each individual setting, providing you with comprehensive instructions on how to set everything up correctly. Any code from the video can be found in this article, so you can use it directly without having to type it out.

This blog post, including video, is part of a series in which we build and set up our own home server. We start with the basics, such as installing Ubuntu VM with Docker, and then move on to configuring our own domain, security measures, and, above all, lots of cool and useful self-hosted services. Whether it's media servers like Plex or Jellyfin or document management like Paperless-NGX, we'll work together to build the setup you want to see. We'll even tackle topics like single sign-on (SSO) together.

What is Home Assistant?

Home Assistant is an open-source platform for home automation that aims to connect all devices in the home and control them centrally. It was developed to provide a unified user interface and simple, flexible control for a wide range of smart home devices from different ecosystems. Here are some points in favor of Home Assistant:

  1. CompatibilityHome Assistant supports thousands of devices and services from various manufacturers, including lighting, air conditioning, heating, cameras, weather sensors, voice assistants and more.
  2. Local controlUnlike many commercial smart home platforms that rely on cloud services, Home Assistant runs locally on your network. This means increased privacy and reliability, as your smart home devices work even without an active internet connection.
  3. Automation and scenesOne of the main features of Home Assistant is the ability to create complex automations and scenarios. For example, you can have lights turn on automatically when it gets dark, or turn on the heating when the temperature drops below a certain level.
  4. Simple user interfaceHome Assistant offers a user-friendly interface that makes it easy to monitor and control devices. This interface is fully customizable.
  5. Integration with voice assistantsHome Assistant can be integrated with voice assistants such as Amazon Alexa or Google Assistant to enable voice-controlled control of your smart home devices.
  6. Open source and community-drivenSince Home Assistant is open source, it is supported by an active community that is constantly developing new integrations and improving existing ones.
  7. Data protection and securityAs a locally running platform, Home Assistant has the advantage that the data remains within its own network. This protects privacy and increases security compared to cloud-based solutions.

In summary, Home Assistant is a powerful and flexible solution for those who want to design their own smart home and control their devices centrally, regardless of the manufacturer or ecosystem.

The problem: Why snapshots are not enough

Home Assistant offers a backup function by default. This creates .tar-archives that contain everything: Your configuration, your databases, your add-ons. This is your life insurance if your SD card in the Raspberry Pi runs out or your SSD gives up the ghost.

But this is often too coarse for day-to-day work („development“).

Just imagine:

  • You are working on three different automations at the same time.
  • Two work great, with the third you make a mistake and accidentally overwrite working code.
  • Your last full backup is 24 hours old.

Your options without Time Machine:

  1. You live with the mistake and try to fix it from memory (annoying).
  2. You restore the backup from yesterday. However, you will also lose the progress on the two functioning Automations and all sensor data of the day (painful).

We need something that works more finely. Something that allows us, individual files to an earlier point in time without touching the entire system. We need a time machine.

What is Home Assistant Time Machine?

The project Home Assistant Time Machine, developed and maintained by DiggingForDinos (currently hosted on Codeberg), is exactly the tool that closes this gap.

This is software that runs in parallel with your Home Assistant. It monitors your configuration files (.yaml) and creates local backup points of these text files at regular intervals (or manually triggered).

The core features at a glance:

  • Selective restore: You can a single Restore automation without touching the rest.
  • Visual Diff: This is the killer feature. You can see your current (broken) file on the left and the old (working) version on the right. The tool marks in color exactly what has changed. One look is often enough to find the typo without having to restore anything at all.
  • Security: Before the tool overwrites a file (restore), it automatically makes a safety backup of the current status.
  • Lightweight: In contrast to Git servers or cloud solutions, it runs locally and requires hardly any resources.

It is important to understand that Time Machine is primarily for your Text configuration (YAML), not for your database (history) or media.

home assistant time machine
Home Assistant Time Machine Dashboard

Requirements

Before we start, we'll briefly check your environment. The good news: the requirements are minimal.

  • Home Assistant OS (HAOS) or Supervised: For the add-on method, you need access to the Add-On Store. This is the standard for most users on Raspberry Pis or Home Assistant Green/Yellow.
  • Docker: If you are running Home Assistant „Containerized“ (Core), you cannot use the add-on, but you do not have to do without it -> see section „Standalone installation“.
  • Storage space: Since Time Machine backs up text files, the memory requirement is minimal. Even with thousands of versions, we are usually only talking about a few megabytes.

Installation via Home Assistant add-on (recommended)

This is the way 95% should go for all users. It integrates seamlessly into your Home Assistant interface.

Step 1: Add the repository

As the add-on is not (yet) included in the official Home Assistant standard store, we need to tell the supervisor where to find it.

  1. Open your Home Assistant.
  2. Navigate to Settings -> Add-ons.
  3. Click on the button at the bottom right Add-on store.
  4. Click on the three dots (menu) at the top right and select Repositories.
  5. Enter the following URL in the field: https://codeberg.org/DiggingForDinos/ha-addons (Note: If Codeberg is currently having problems, there are often mirrors on GitHub, but Codeberg is the official source of the developer).
  6. Click on Add. After a short loading time, the repository should appear in the list.

Step 2: The installation

  1. Close the repository window.
  2. Reload the add-on store page once (F5 in the browser) so that the new content is loaded.
  3. Scroll down (or use the search) to the „DiggingForDinos Add-ons“ section.
  4. You will probably see two similar add-ons there:
    • Home Assistant Version Control (This is for Git backups, more on this later).
    • Home Assistant Time Machine (That's what we want!).
  5. Click on Home Assistant Time Machine.
  6. Click on Install.
  7. Wait a moment. In the meantime, activate the switches for:
    • Always update (watchdog): Yes, so that it restarts if it crashes.
    • Automatic updateOptional, I prefer to do updates manually to read changelogs.
    • Show in the sidebar: ACTIVATE ABSOLUTELY. This makes access much more convenient.

Go back to the tab Information on and click on Start. Wait a few seconds and take a look at the Protocol (log). If it says something like „Server started on port...“ and there are no red error messages, you've made it!

Now click on the new entry „Time Machine“ in the left sidebar of Home Assistant.

Step 3: The configuration

Call up Time Machine in your sidebar. There you can click on the Settings button at the top and make some settings.

Customize paths

Normally the defaults are correct:

  • config_path: /config (This is where your YAML files are located).
  • backup_path: /data/backups (This is where Time Machine stores its versions.)

Schedule

Here you can set how often Time Machine automatically takes a snapshot.

  • Format: Cron syntax or simple intervals (depending on the version).
  • Recommendation: hourly (hourly) is good for hobbyists. If you change very little, that's enough daily.

Save the configuration.

The user interface: A tour

When you open Time Machine, you are greeted by a tidy interface. It is not a cluttered design, but functional.

The dashboard: Here you can see a timeline or a list of your backups. Each backup has a timestamp.

The navigation:

  • Backups: Your list of snapshots.
  • Settings: Here you can set, for example, how many backups should be kept („Retention Policy“) so that your memory does not fill up. A good value is, for example, „Keep last 50“ or „Keep last 7 days“.

When you click on an entry in the backup list, the magic happens: the File Browser. Here you can see the structure of your /config folder at the time of the backup.

Practical scenarios: Time Machine in use

Theory is good, practice is better. Let's run through two scenarios that every HA user will encounter sooner or later.

Scenario A: Broken automation

Situation: You've been tinkering with your „Good night“ automation. You wanted to add a condition. Now it no longer triggers at all. You no longer know exactly what the code looked like before.

Solution with Time Machine:

  1. Open Time Machine in the sidebar.
  2. Find a backup from yesterday (or from an hour ago, before you started).
  3. Navigate in the file browser to automations.yaml (or the folder where your automation is located).
  4. Click on the file.
  5. You now see the Diff-View.
    • Left (red): What Time Machine has saved (the old, working version).
    • Right (green): What is currently on your server (the broken version).
  6. You immediately realize: „Ah! I made a mistake when indenting!“
  7. Option A (Manual): You go back to your editor and correct the error.
  8. Option B (Restore): In Time Machine, click on the button Restore.
  9. To be on the safe side, Time Machine will ask you and then overwrite your corrupted file with the old version.
  10. Then (important!) you have to go to Home Assistant under „Developer tools“ -> „YAML configuration“ and select the Reload automations, to make the change active. (Some versions of Time Machine even offer a button for this directly).

Scenario B: The „What have I actually changed?“ moment

Situation: Your system is not running smoothly. A sensor is giving strange readings. You're sure you haven't touched anything for days. Or have you?

Solution:

  1. Go to Time Machine.
  2. Compare the current status („Current“) with a backup from 3 days ago.
  3. Time Machine shows you all files that are different.
  4. You may see that another add-on or an update has subtly changed a configuration file.
  5. This transparency is worth its weight in gold when troubleshooting.

Deep Dive: Time Machine vs. Version Control (Git)

In the DiggingForDinos repository you will often also find the add-on „Home Assistant Version Control“. Many users confuse the two.

What is the difference?

Home Assistant Time Machine:

  • Storage location: Locally on your device.
  • Technology: Simple file copies and diffs.
  • Target group: Everyone. Does not require Git knowledge.
  • Advantage: Fast, visual, simple one-click recovery.
  • Disadvantage: If your hard disk dies, the Time Machine is also dead (since it is on the same disk).

Home Assistant Version Control (Git):

  • Storage location: Local + remote server (GitHub, Codeberg, GitLab).
  • Technology: Git (real versioning).
  • Target group: Advanced.
  • Advantage: Offsite backup! If your house burns down, your config is safe on GitHub. You have a perfect history over the years.
  • Disadvantage: Restore is more complex (git pull commands via terminal), no nice „click-bunti“ restore interface for individual files to the same extent.

The professional strategy: Install both! Use Time Machine for the quick „undo“ when tinkering. Use Version Control, to automatically push your configuration to GitHub/Codeberg every night as the ultimate disaster recovery.

Alternative: The standalone installation (Docker)

You don't use a Home Assistant OS, but run HA as a Docker container? No problem. You can simply add Time Machine as an additional container.

You must ensure that the Time Machine container has access to the /config folder of your Home Assistant container. This is solved via Volumes.

Here is an example of a docker-compose.yml:

docker run -d \
  -p 54000:54000 \
  -e HOME_ASSISTANT_URL="http://your-ha-instance:8123" \
  -e LONG_LIVED_ACCESS_TOKEN="your-long-lived-access-token" \
  -v /path/to/your/ha/config:/config \
  -v /path/to/your/backups:/media \
  -v ha-time-machine-data:/data \
  --name ha-time-machine \
  ghcr.io/diggingfordinos/homeassistanttimemachine:latest

Note: Since image names and registry paths often change in community projects, please check the Codeberg repo to see if there is a ready-to-use image or if you need to use the build: ... command should be used.

After starting, you can access Time Machine under http://deine-ip:54000.

Common problems and solutions (troubleshooting)

The add-on does not start.

  • Solution: Check the logs. Usually the ha_token copied incorrectly (space at the end?) or the path to /config is not true.

I don't see any diffs, the file looks empty.

  • Solution: Empty the browser cache. Sometimes the frontend gets choked.

The „Restore“ button does not work.

  • Solution: Check the permissions. If you are sharing files via Samba or SSH as root and created Home Assistant as user is running, Time Machine may not be able to overwrite the file. In the terminal, enter chown or use the „Fix Permissions“ button in many HA tools.

The add-on repository cannot be added.

  • Solution: Codeberg might be down or the link has changed. Search for „DiggingForDinos ha-addons“ on GitHub, there is often a mirror there.

YouTube video implementation

Conclusion

The Home Assistant Time Machine is one of those tools that you only know you need when it's too late. It takes the horror out of „tinkering“ with Home Assistant.

The difference between „Oh no, everything's broken“ and „No problem, I'll go back 10 minutes“ is massive for the WAF (Woman/Wife Acceptance Factor) and your own blood pressure.

While Git-based solutions (such as the Version Control add-on) are technically superior for offsite backups, the Time Machine wins due to its Visualization. To see, what has changed is often more valuable than the backup itself.

My recommendation: Install it today. Now. Before you tweak your configuration next time. It costs nothing, uses hardly any resources and saves you the weekend in an emergency.

Happy Automating!

Useful links at a glance

  • Repository URL for add-ons: https://codeberg.org/DiggingForDinos/ha-addons
  • Source code Time Machine: https://codeberg.org/DiggingForDinos/HomeAssistantTimeMachine
  • Official Home Assistant documentation on backups: https://www.home-assistant.io/common-tasks/os/#backups
The product display was implemented using the affiliate-toolkit WordPress plugin.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.