Hass.io Add-on: Auto backup

I’m also interested in this. It’s the reason why I have disabled it at the moment

Sorry to keep badgering but this powerful tool seems overly complicated, I’m baffled.

I just want hass.io to do a routine dump / backup snapshot, the way the current user interface allows you to now, manually.
SERVER/hassio/snapshots
(type a name, choose a type, click create)

I know the file is, in my case, dumped in /usr.share/hassio/backup/blahblah.tar

I just want this to be run, once a week, I can handle copying the .tar file out, elsewhere.

How do I get hassio to run these backups, routinely, to this path?

You use an automation!

Sorry I’m not sure what you mean.

The user interface is complicated, including ini / scripts just to run a backup. The default won’t just do a “create snapshot” which is all I really need.

Well an automation to do this has been posted hundreds of times probably but I’m feeling generous so here is mine:

- id: 'createsnapshot'
  alias: Make Snapshot
  trigger:
  - platform: time
    at: '03:00:00'
  condition: []
  action:
  - service: hassio.snapshot_full
    data_template:
      name: Automated Backup {{ now().strftime('%Y-%m-%d') }}

Mine also does notifications and uploads to dropbox but you wanted a basic snapshot.

I should be pasting this, into the “config” section within the hass.io addon details right?
Within “Auto Backup Hassio 1.0.2” ?

When I paste your example, the save button greys out unfortunately.

No it’s an AUTOMATION it is not reliant on ANY component. It just runs the built in snapshot service at 3am every morning.

I do not know how to add it? The interface looks nothing like that plain text box to paste the script

I tried adding

Automated Backup {{ now().strftime(‘%Y-%m-%d’) }}
and
{{ now().strftime(‘%Y-%m-%d’) }}
and
{ now().strftime(‘%Y-%m-%d’) }

To the “Service data” field but no dice. I feel like I’m pretty close.

edit automations.yaml file and paste it in. Reload automations and you will see it in the GUI editor.

Thanks David, I ended up using the web based user interface to do it. Seems to be behaving quite well - so that’s good.

I noticed MOST people here, seem to post automations in the raw format as you did, must just be habit of experienced people to edit the file by hand rather than use the builder.

Yes because the GUI editor won’t let you use complex conditions etc… it’s just easier. The GUI editor also tends to mangle the yaml format. It’s much easier when you have been doing it for a while.

@marcelveldt

After a backup restoration and hassio 96.5 update the addon doesn’t works for me…

i’ve tried to reinstall, rebuild, etc… but still not working… please could you help me?

Can you copy the backup files back into the backup folder of Hass?
When you reboot system then you can goto snapshot en restore your whole config?

Cheers
Peter

I’m trying just this at the moment… Had to reinstall Hass.io but it doesn’t work at all and not sure how to fix… Send help :stuck_out_tongue:

edit : for some reason hass.io installed itself in another folder. After placing the files in the correct folder this works fine!

1 Like

Installed this ‘add-on’, but I see that something is missed -> ‘warnings.warn(_MISSING_FILE_MESSAGE.format(filename))’.
Is that O.K.?
Or should be something added? See full message below.

Using cron schedule: 0 4 * * *
crond: crond (busybox 1.29.3) started, log level 8
crond: USER root pid  11 cmd python /usr/src/app/main.py > /proc/1/fd/1 2>/proc/1/fd/2
2019-10-23 12:38:49,698 INFO  --  
2019-10-23 12:38:49,699 INFO  -- ############## AUTO SNAPSHOT TASK STARTED ################
/usr/local/lib/python3.7/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /data/credentials.json: No such file or directory
  warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
2019-10-23 12:38:49,707 ERROR -- No credential to refresh.
2019-10-23 12:38:49,708 WARNING -- You need to authenticate Google through the webinterface!
10.0.0.2 - - [23/Oct/2019 12:39:15] "GET / HTTP/1.1" 200 -
10.0.0.2 - - [23/Oct/2019 12:39:15] "GET /favicon.ico HTTP/1.1" 200 -
2019-10-23 12:41:25,461 INFO  -- Received Google code: 4/sgGvxELrcbWwJ85eKerdssfdfdDxGgWR35Orp68zffsfskf2SnUNO4VKEoIBSI
10.0.0.2 - - [23/Oct/2019 12:41:25] "POST /send HTTP/1.1" 200 -
2019-10-23 12:41:27,565 INFO  -- Creating new hassio snapshot autobackup 2019-10-23 14:41:27 - This may take some time...

I had a related issue that other folks might hit. I had (yet another) SD card corruption and I did the full create a new SD card, boot it, get and apply the backup.

Everything was running except the frontend. I could ssh into the home assistant container to access the hassio home assistant command line. Could also use the HDMI/Keyboard to access the Hassio command line. The main Home assistant http page would not come up. I spent a long time trying to figure out why and eventually tried the command:

hassio homeassistant check

and discovered that I had missed the notice that the http password auth was depreciated and no longer directly supported but must be set up as a legacy api password or better yet replaced with the homeassistant authentication https://www.home-assistant.io/docs/authentication/providers/#configuring-auth-providers

I had an issue recently and ended up using some previous backup file. When I did I discovered that secrets.yaml and customize.yaml had not been backed up. Is there any fine tunning needed for this?

thanks

Nobody? If my understanding is correct, full backup is the default backup method, Isn’t it?

Google is now throwing an alert saying the app isn’t certified to login…

1 Like

@marcelveldt I have just installed version 1.0.2 of this add-on, and enabled the Google Drive backup option. I got the message in the apps log to authenticate my Google account.

So I click the Open Web UI and follow the link to authorise my Google account, after authenticating (including 2FA) I get a warning saying that “Sign in with Google has been temporarily disabled for this app” and I cannot proceed.

I have tried using Chrome and Firefox and keep getting this issue. I have even tried with an App specific password but still no joy, please can you let me know what I am doing wrong?

Thank you

2 Likes