HA installation on Synology growths and growths fast ! Please advice

Dear all,
I am using HA on a Synology NAS. Running in a VM
This works great but when I make a full copy of the VM on my Synology NAS, it takes longer and longer. Initial a backup was about 500MB one year later it has become 6GB. This is growing FAST.
The backup in HA is not growing that fast.
So has anyone an idea what is happening?
How can I reduce the size of the VM?
many thanks in advance,
Regards,
Frank

  • Is your system DB local to VM? If so, is the DB growing causing growth of entire backup? Unless it is excluded from being backuped, but might ba backed up as part of VM.To reduce size of VM you can use external DB (there is MariaDB package for Synology) and then it will not be included in backup.
  • How many backups done by HA itself do you keep? What is retention policy. As being part of VM these backups might contribute to size of VM backup done on synology. If you have 12 monthly backups kept it makes your numbers: 12 * 500MB = 6GB… You can mount shared folder of your NAS and use it as destination for backups, not be included in VM backup.
1 Like

Most likely your database is growing fast. Read and understand the recorder to solve this issue.

You might have changed the default recorder settings in configuration.yaml.

1 Like

Many thnx for taking the effort to answer. Very much appreciated.
Yes, I use a ‘default’ installation, so nothing special with a separate DB. I need to read more about that and how I can configure that.
Then also the question how to reduce the present VM?
Do I need to do a clean install and migrate from the existing one to the new one?

Als many thanks for taking time, Much appreaciated !
I will start reading you suggested.

Developer Tools → SERVICES → Recorder: purge → configure → CALL SERVICE

1 Like

You need to identify what is the cause of size before you start trying to shrink anything. There are multiple threads on the site that talk about reducing the size of the ‘recorder’ dB to start.

Also take a good hard look at the media folder.

6G in a year isn’t a whole lot tbh. Especially if you have any cameras. My personal backup is somewhere around 12-15g.
It ballooned to 45 in the first year due to backup of the media folder and all my security cam snapshots. Now I exclude them but the backup is still around the 12g size mentioned above

So yes do the things to shrink but do find out why it got that way because I strongly suspect your actual use will be something higher than you expected and you need to plan an update to your storage. (I need to keep it hose camera snapshots so I move them to an archive on a regular basis but they’re not in the HA backup and had to plan for it)

1 Like

Thnx for responding.
I do not have any camera’s. Only quite some Z-Wave switches and other sensors

So you’re saying that the HA backup is not that big? Then I guess you are backing up old / removed data. The VM backup basically compresses its disk image, if there were files there that got removed the bits are actually still there (all the old OS updates and remnants of databases etc). So this is to be expected. You can even try it by uploading a 1 GB file to your instance and then deleting it. If you make a backup immediately after I assume it will grow by another GB (or at least few hundred MBs, it can still overwrite some old data there).

It is also possible you have a dynamic disk image in your VM. This means it is growing once the system accesses an area that has not yet been allocated. Anyway it looks like your issue is data management by the VM and not HA growing out of control :).

If you want the backups to be small just set up an automatic backup from within HA and store it on a remote drive or some attached USB storage. In case of total failure it is relatively quick to setup HA and restore the backup.

2 Likes

This is just a lack of understanding of the way a hypervisor and VMs works in combination with how file system works.

When a file is written to a disk it will fill out the bits with 1s and 0s to make up the content of the file and an entry is written in the file system list.
When a file is deleted from a disk the entry pointing to content is delete, but not the file.

A VM can be created with a dynamically disk, that grows as space is needed.
The hypervisor can detect the writing of the disk and grow the disk for the VM, but when the VM deletes files the hypervisor can not see that, because only a little entry is (over)written.
When you do a backup of the VM from the hypervisor, then you will backup all the real files and also all the deleted files of the disk.
When you do a backup from inside the VM, then you will only back the real files.
HA regularly runs a trim command to help the hypervisor get a better view of the disk, but it is not something that happens several times a day, so there will always be a difference between the two backup methods.

3 Likes

Thnx !

  1. I first stop the VM running HA in the ’ Virtual Machine Manager’
  2. The I use the ‘Export’ command from the ’ Virtual Machine Manager’ in Synology.
    What should I do instead?

Instead you’d be fine with just plain old HA backups, is that an option for you? :slight_smile: