Backup backups also temporary files

With OH 2.3 the folders userdata/cache and userdata/tmp are also backed up. This blew up my backup file from less than 1 MB to more than 100 MB.

It takes a lot of time and I’m backing up these files on an other machine, where it uses a lot of space.

Is there a reason for the change?

I am not privy to the discussion or reasoning why this was changed. However, I can make an educated guess.

Topically when one makes a backup, they want to be able to user the backup to restore their system exactly the way it was. Since the the actually bindings and other state gets saved to cache and temp it makes sense to beach them up. Otherwise you are not restoring to the exact same state as you had before because all the bindings are reinstalled and all the state stored in temp is lost.

So, while it is possible to restore an oh without cache and temp, it won’t be an exact restore because all the bindings will be reinstalled and temp repopulated.

It would be great to have an option to switch this behaviour on and off…