Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup & Restore #1033

Closed
tuicemen opened this issue Dec 17, 2018 · 8 comments · Fixed by #1115
Closed

Backup & Restore #1033

tuicemen opened this issue Dec 17, 2018 · 8 comments · Fixed by #1115
Assignees
Milestone

Comments

@tuicemen
Copy link

Currently the Backup and restore of HA-Bridge works great.
However this saves the files to the device HA-Bridge is running on.
If this device fails or if in a Pi and the SD card gets corrupt there is no way to retrieve a back up to restore.
Or am I missing the obvious?
It would be great if when trying to do a back up or restore HA-Bridge asked the location to save or restore from/to

@Hollybrook
Copy link

+1 on this issue. I tried to stop HA-Bridge and ftp the config file, but it is locked for access.

@bwssytems
Copy link
Owner

This makes it simple to manage backup files and load them back in. I suppose we could enhance it to be able to download the backup files from the list to your remote machine.

Also, you could open up sftp (would not recommend ftp anymore) and you can mount that on you other machine and copy them over. The service is not started by default but can be enabled in the raspi-config program or google it.

@Hollybrook
Copy link

Sorry, I should have been more precise. I was using sftp on my other machine but could not access the config file because it was "open for read" even after stopping the bridge on the Pi.

And to Tuicemen's point, a one button backup to other machine like HomeGenie provides would be an optimum solution.

@tuicemen
Copy link
Author

This makes it simple to manage backup files and load them back in. I suppose we could enhance it to be able to download the backup files from the list to your remote machine.

Agreed the backups and restores currently are simple to create and restore also much faster then saving or restoring to/from another device.
The big problem I had was is if the device HA-Bridge is running on crashes like my PC did recently and one of my Pi SD cards got corrupt. No fault of HA-Bridge was my own fault for not putting a back up else where.Having this option most likely have made things so much easier (that is if I used it)

@craigski
Copy link

I think the issue is the *.cfgbk backup files are owned by 'root'. The 'pi' user does not have read access when using ftp/scp from another machine:

pi@pi2:~/ha-bridge/data $ ls -lrt
total 24
-rw------- 1 root root 1430 Dec 7 09:05 habridge.config-2018-12-07-09-23-09.cfgbk
-rw-r--r-- 1 root root 3632 Dec 7 10:08 device.db-2018-12-07-14-52-05.bk
-rw------- 1 root root 1430 Dec 7 12:18 habridge.config-2018-12-07-14-51-57.cfgbk
-rw------- 1 root root 1780 Dec 14 21:52 habridge.config
-rw-r--r-- 1 root root 5710 Dec 15 14:21 device.db

Changing permissions of *.cfgbk to 644 same as the *.db and *.bk files would allow ftp/scp.

@tuicemen
Copy link
Author

@craigski you are correct changing the file permission will allow you to copy the cfgbk file.
Still a lot of extra work, if this could be avoided that would be awesome.

@bwssytems bwssytems added this to the V5.3.0 milestone Jun 11, 2019
@bwssytems
Copy link
Owner

I have download working, next is upload

@tuicemen
Copy link
Author

Awesome!!

@bwssytems bwssytems self-assigned this Jun 12, 2019
bwssytems added a commit that referenced this issue Jul 29, 2019
Fixes #670 Execute select Device when bridge loads [Enhancement Request] enhancement
Fixes #877 Color in Hue/Sat enhancement
Fixes #917 lock device ID #s enhancement
Fixes #1032 Support for HomeGenie enhancement
Fixes #1033 Backup & Restore enhancement
Fixes #1060 Voice command colour change bug question
Fixes #1077 several somfy action in a same Row ID doesn't work bug question
Fixes #1084 Add Mozilla IoT gateway Helper enhancement
Fixes #1092 ha-bridge incompatible with Amazon Echo Dot Gen. 3? enhancement question
Fixes #1093 Alexa Issue : ID conflict between HA Bridge an Hue Bridge enhancement question
Fixes #1094 issue with 5.2.2 and Harmony enhancement question
Fixes #1095 issue with 5.2.2 and fhem enhancement question
Fixes #1098 Home Assistant has new authentication methods and Legacy API Passwords will be removed enhancement question
Fixes #1103 Have single scroll bar for Bridge Devices page. enhancement
Fixes #1108 Add mDNS Discovery to ha-bridge
Fixes #1109 Add HTTPS to ha-bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants