homebridge/homebridge-config-ui-x

Exclude a folder from Homebridge Backup as a plugin dev

maxileith opened this issue · 14 comments

Current Situation

Hi,

I am developing a plugin and am storing information in the homebridge storage path. Is it possible to exclude a folder from the homebridge backup as a dev for example by putting a .homebridgebackupignore file or something similar into the folder?

Logs

-

Configuration

-

Environment

  • OS:
  • Software:
  • Node:
  • npm:

Process Supervisor

hb-service

Additional Context

No response

I meant to open this in homebridge/homebridge. It seems like you are redirected to this repo when opening an issue template from the app … then the issue will be opened in the .github repo…

On the issue opening issue, which template did you select ?

image

On the issue opening issue, which template did you select ?

Support request

could potentially be a bug in the app. wasn't able to recreate on safari.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Not stale.

In which situation would you want a homebridge backup to exclude a directory from the homebridge folder?

Hi @bwp91,

I am working on https://github.com/maxileith/homebridge-appletv-enhanced . This plugin is creating a virtual python environment which is specific to the cpu architecture. When creating a backup, the folder of the python environment is backed up as well. When restoring a backup on a different cpu architecture, the virtual environment won't work. If the virtual environment would not be included, the plugin would create a new virtual environment itself on the new system.

I see.

So relative to a user's homebridge folder, what would be the location of the python env that would need to be excluded?

That would be appletv-enhanced/.venv.

I think this could be an easy fix in the UI repo, to ignore any .venv from being included in the backup file.

change: 3c40357

this should be included in the beta version of the UI, v4.54.2-beta.62 or later.

Could you give this a try and see how you get on?

I have also transferred this to the UI repo since it is the UI that creates that backup files

Could you give this a try and see how you get on?

Sure I can. I will give you an update as soon as I have the time to test it 👍

@bwp91 I just tried the Config UI Beta and it does indeed work. The .venv folder is excluded and the file size of the compressed tar file goes down from 30MB to 10KB. When restoring the backup, my plugin recreates the python environment.