Homebridge-config-ui-x: clean up config.json history files

Created on 3 Jun 2020  路  8Comments  路  Source: oznu/homebridge-config-ui-x

Is your feature request related to a problem? Please describe:
config.json.* history files are stored in the top level of a user's homebridge install. This can be cumbersome. (I have over 150 of these files at the moment).

Describe the solution you'd like:
store them in a sub directory by default (e.g./homebridge/confighistory)

Describe alternatives you've considered:
I can't think of a cleaner solution other than something complex like a database or checking in changes to github, which are overkill.

Additional context:

enhancement stale

Most helpful comment

As of v4.29.0 config backups will be stored in ./backups/config-backups.

The folder path will be created on start - if the path cannot be created and does not already exist (for example, it might be a file), the original storage location will be used and a warning will be shown in the log.

The most recent 100 backup files will be migrated to the new location on the restart following this update.

All 8 comments

There is a button in the UI that deletes all of these. On the config editor tab, click restore, scroll down, then remove old backups.

Yes, but I can imagine someone saying, "I want to be able to revert to previous versions." and still wanting to reduce clutter. Sticking them in a sub folder just seemed like a nice touch. The active file could still be at the root level. But stick edits one level down.

Just a thought.

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.

Perhaps a better refinement of this request might be to keep a rolling history for config.json files. [not going to touch the question of location].

Add a user configurable option to optionally roll off config.json history files automatically by either number files or date (X files, or keep last X days/weeks/months).

Just a thought, if you find yourself with copious free time, not like it isn't hard to add a simple cleanup script hung on cron job myself.... If it really bothered ME 馃榾

--Tom

Agreed. A script isn't complicated but this seems like functionality that should be baked in. I like your suggestion though.

As of v4.29.0 config backups will be stored in ./backups/config-backups.

The folder path will be created on start - if the path cannot be created and does not already exist (for example, it might be a file), the original storage location will be used and a warning will be shown in the log.

The most recent 100 backup files will be migrated to the new location on the restart following this update.

Awesome! Thanks.

v4.31.0 will complete this task by periodically removing config.json backups older than 60 days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ronald8192 picture ronald8192  路  6Comments

DJay-X picture DJay-X  路  6Comments

RaymondMouthaan picture RaymondMouthaan  路  5Comments

afharo picture afharo  路  5Comments

grzegorz914 picture grzegorz914  路  6Comments