No Space to Create Backup

I am trying to create a backup so that I can move my config onto another system however I am unable to craete a backup as it keeps timeing out upon checking the supivisor log, I can see that there is not enough storage space to create a backup there is only 2.2Gb free on the drive. I have deleted all old backups and unused adons and reduced ther size of the DB and still not enough room. Does anyone have any ideas what else I can try, is there away of downloading the backup straight to another device insteadn of the local storage?

As the backup only does the ‘config’ and subs, you could also copy that manually. Do check other recent posts that showed issues when moving one config to another machine, i.e. donot switch of the souce before you are happy with the target :slight_smile:

If i copy the contents of the config folder when I reinstall HA how do i import this?

Depends on your access/setup, I have a docker-setup with sambashare to my config folder, on can (s)ftp…this is more datahandling … if you are HAOS then I am no help…there are other posts on how to move files around

Don’t just copy the config folder. You mentioned addons so you have those, copying the config folder will miss all those.

One simple thing to try if you haven’t yet is to run ha su repair. That should prune old images which can take up quite a lot of space. Or if you prefer you can attach a monitor to HA and run docker image prune -a from the host shell. Not sure it’ll help but it’s easy to try.

Where is your database? Did you change recorder to MariaDB or something else or do you use the default sqlite option (home-assistant_v2.db file in /config)?

If you are unable to free enough space for a backup and you use the default sqlite db then one option would be manually moving just the DB. So use ftp or samba or something to pull just home-assistant_v2.db (and the wal and shm files) onto another system. Then while HA is shutdown delete those files entirely to force HA to create a new DB from scratch without any history next startup. Make your backup then now that history is entirely gone. Then once you restore your backup shutdown HA again, delete the new DB files and put your old ones back.

If you don’t use the default sqlite db and you use the MariaDB addon instead then that’s trickier. A similar option could be to try and take a partial backup of just that addon. Then get that backup off the system via ftp or samba and remove it. Then take a backup of everything else. Then when you restore to the other system restore the MariaDB addon first and the other one second. That way MariaDB is running by the time HA starts up.

Some other less appetizing options:

  1. Do you have a lot of media? If so skip that from the backup. Move /media separately via ftp or samba
  2. Any giant files or media files in elsewhere in your HA folders? If so consider moving them separately and deleting them so they don’t get included in backups
  3. Are any of your addons huge? It’s tedious but perhaps backup them up in partial backups one by one to see how big the backup is. If you find a huge one then keep that partial backup, move it off the system and exclude it from the main backup
  4. Purge mass amounts of data out of your DB by setting purge_keep_days very low and then calling recorder.purge. Or even consider a clean break with history and starting fresh if it is simply too big

Unfortunately there is no way to backup directly to a network drive or anything like that, local storage only. So best you can do here is delete things until it fits.

Thanks for this review, I have read quite a few posts on how to restore and none mentioned the add-ons in particular. Also, I read on backups which were stated to backup just config…maybe the doc needs to be more specific?