gcgarner / IOTstack

docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.5k stars 578 forks source link

Dropbox issue fixed #151

Closed DIYtechie closed 4 years ago

DIYtechie commented 4 years ago

fixes issue #127

Slyke commented 4 years ago

I have submitted this PR on your behalf over at the fork: SensorsIot#10, If you would like to have your name to the commits, please submit the PR there and let me know so I can remove the PR I created on your behalf.

DIYtechie commented 4 years ago

Thank you very much @Slyke for submitting on my behalf. Looking very much forward to seeing all pull requests being merged into the SensorsIot fork. I may add HDMI-CEC and Flic to the stack as well, if I can find the time soon. @gcgarner did a great job making this awesome script, and its great to see others taking time to improve it.

Paraphraser commented 3 years ago

@DIYtechie can you remember the background to this change?

On the Discord channel there's a discussion which is very close to the issue reported by @olonsoft, which didn't seem to get any response.

The commit message gives no insight into why this change was needed. I've been wondering whether the dropbox_uploader.sh script changed and this PR was a matching change? Any ideas?

877dev commented 3 years ago

I updated to the latest version of Dropbox Uploader, and it seems to save the files differently, which I assume is why @DIYtechie changed from $dropboxfolder to $backupfile.

image

However the rest of the docker_backup.sh script expects to see the $dropboxfolder i.e. /IOTstackBU. Hence why the older backups are not getting deleted.

877dev commented 3 years ago

After looking for a while, it seems this will fix the issue:

Line 66: $dropboxuploader upload ./backups/$backupfile $dropboxfolder/$backupfile

Here is my fixed version of the script, also took the chance to update Dropbox retention to 30 days. My thought are if things go wrong while on holiday, you have a chance of still having a working backup!

https://gist.github.com/877dev/075921e9958eb72cc790a34efd4a8039