How Hubitat Backup/Restore has Saved My Ass

Should anyone want to do this in Windows with Curl

  1. Create a directory C:/hubBackup (or any name you want) to store the backups

  2. Create a daily scheduled task with the following action,filling the optional "start in" field with, C:/hubBackup/
    curl --url http://HubIP/hub/backupDB?fileName=latest -OJ

  3. To delete backups over 10 days old
    ForFiles /p "C:\hubBackup" /s /m *.lzf /d -10 /c "cmd /c del @file"

Note: matching files names are NOT overwritten

7 Likes