A backup tool, with automated schedule, excluding db files (since they are usually large)

I know there are hundreds of ways (ftp, sftp, cccp, ussr, cia, cp …) , half a dozen addons (google drive dropbox xxx share), that enables you to have a backup of the few cofiguration files. But it would be nice to have an extremely simple way to backup: just click and you have them backed up.

p.s. A pissed user that lost half the configuration files, because of a hw problem, and disabled few days ago all the hassio backup addon because for one reason or another, all have problems.

Are you not familiar with snapshots? This is literally a one button backup that is built into the system.

Sure if you remember to press the button, which I didn’t

Seeing that even if there is a backup button it might not get pressed, perhaps your Feature Request should be for automated scheduled backups?

1 Like

https://github.com/SilvrrGIT/HomeAssistant/blob/master/automation/snapshot.yaml

Auto backups.

Don’t include the delay or anything after for just a backup to the local machine.

3 Likes

… Bro, I’m sorry but that’s on you. You can even make an automation that performs a back up once a week. The tools are here already and it’s SUPER easy.

- alias: Snapshot Once A Week
  trigger:
    - platform: time
      at: '10:00:00'
  condition:
    - condition: time
      weekday:
        - wed
  action:
    - service: notify.ios_notify
      data:
        message: "Creating Snapshot"
        data:
          push:
            badge: 1
    - service: hassio.snapshot_full
      data_template:
        name: >
          weekly_backup_{{ now().strftime('%Y-%m-%d') }}
3 Likes

jinx, no tag backs

Super easy but I disabled it since it backs up also my log file which is 2Gb+ and filled up my host.

And I could not find an easy (for me) way to backup all EXCEPT the homeassistand_v2.db

Okay, then then this really needs to be “Exclude database from backup” as an option for partial backups.

and for another simple solution… Don’t put your database inside your config folder.

recorder:
  db_url: <anywhere on you system but config folder>\database.db
3 Likes

Ohh thats a nice solution, which can be a place not taken by the full snapshot in hassio? /backup ?

I will try, thanks

Hi, putting db_url: /backup gives this error.

I am in HASSIO and the only directory outside of config and share (which both get used in the full/partial snapshot) is /backup (I think)

[homeassistant.components.recorder] Error during connection setup: Could not parse rfc1738 URL from string ‘/backup’ (retrying in 3 seconds)

or thatys the solution: personally I don’t care of backing up my history (I guess for the majority of user is the same)

I actually like the idea of excluding the database. It’s not in the options and it really should be. But I would expect it to only work on the default database.

2 Likes

Well for those that use other DB, I guess the extension is .db, so should not be too difficult to exclude all files with .db.

EDIT: now I guess the thread title is correct :stuck_out_tongue:

I agree. Adding this and a scheduling option to the snapshot page would be great.

Yep, while scheduling can be done relatively easy with an automation (although would be a nice feature having it ready made in web-ui configuration), excluding the .db its more difficult

Could you give a working example of where to store the DB in Hass.io, that wont be backed up?
Tried several options but it gives me an error every time, probably because i no nothing about hassio file system formatting :slight_smile:

interested too

Just put in any path, it can be on your network. Just place it outside the config folder and you should be good to go.

Could you please give me an example that would work on hassio?

How would I change the following in order to store the db in the /backup or /share folder?

recorder:
  db_url: <anywhere on you system but config folder>\database.db

Thanks again, and excuse my ignorance :slight_smile: