I have an automation which calls ‘hassio.snapshot_full’ on a certain day each week which is then backed up to google drive.
If I create a snapshot manually through configuration-snapshot then the snapshot is given a date title, however when the automation creates the snapshot it gives it a random string of letters and numbers i.e. ‘7153351be’ which when it is uploaded to google drives makes it difficult to identify when it was made.
Hassio creates the file with an random ID name, but when you copy into backup folder, you can see it with the name that you save the file.
If you want to know which is the last backup file, you can order files by date in your OS filesystem or Google Drive.
If you want to put the date into your Backup name (not the file), you can create an automation:
- alias: 'Create Weekly Backup' // Sunday at 02 AM
initial_state: 'on'
trigger:
platform: time
at: '02:00:00'
condition:
condition: time
weekday:
- sun
action:
service: hassio.snapshot_full
data_template:
name: Hassio ({{now().strftime('%d.%m.%y')}})
Error loading /config/configuration.yaml: while parsing a flow node
expected the node content, but found ‘-’
in “/config/automations.yaml”, line 610, column 43
Any idea how to only keep the last x backups? Say I want to want to make a backup and I then create a backup task in my Synology NAS so it copies it to another drive in case everything goes wrong. Now my backup would increase every time because hassio creates new .tar files, why I only want to keep the last 7 or something, and let my Synology keep track of versions. Might be easier to just sync the whole hassio drive and folders…