Searching 100% safe backup solution

The RPi4 needs an internet connection to access an NTP server to set the time on the RPi4 because the Pi does not have a battery backed up clock onboard. I have seen other discussions on this forum for getting around this but I have not tried them - I am ok having an internet connection (I manage my internet traffic using firewall rules). Home Assistant also needs an internet connection to check HA component updates but you decide if / when to apply these updates.

My procedure:

  1. Shutdown Home Assistant: Settings → System then click the “power” button in the upper right corner
    image

  2. Power off the RPi4 before removing the SD card.

  3. Remove SD card and mount on a Windows 10 PC (I have not upgraded to 11 yet).

  4. Shutdown / exit Google Drive (this is an important step for me because the next step will not work if I do not do this).

  5. Run Win32DiskImager to Read the contents from the SD card to a windows image. Note: you need enough free disk space to handle the entire size of the SD card regardless of how much space is actually used on the SD card).

  6. Get another identically sized SD card and format it using SD Card Formatter.

  7. Run Win32DiskImager to Write the windows image file back to the SD card.

  8. Use the Windows Eject (safely remove) the SD card from Windows.

  9. Place the new SD card into the RPi and reapply the power.

I have been using this procedure every month for over 4 years. It has never failed. It proves that the backup AND restore actually work. Since the old SD card is a working system, you know you can drop back to it if needed (which I have done a few times for various reasons).

I have a set of 4 SD cards that I rotate through: Current (production), backup 1, backup 2, backup 3. I have never had an SD card failure…yet. But if I do, I’m ready. The down side of this approach is that I could lose up to a months worth of historical data. That does not matter to me but it might to others.

I also use the Google Drive add-on solution. This runs on a weekly schedule but I have never needed to restore using these backups (I really should test this :slightly_smiling_face:).

You may also want to look at: Disaster Recovery Planning. It is part of the Home Assistant Cookbook Index that has some other good info too.