danielwelch / hassio-dropbox-sync Goto Github PK
View Code? Open in Web Editor NEWBack up your Hass.io snapshots and other local files to Dropbox
License: Apache License 2.0
Back up your Hass.io snapshots and other local files to Dropbox
License: Apache License 2.0
Running HA 0.109.6 on rPi 3B+
Latest version of the addon.
The addon documentation lists keep_days as will remove local snapshots older than the specified number of days. The addon has removed anything.
It would be nice for this feature to work so it doesn't fill up the SD Card.
@danielwelch are you still maintaining this add on?
Supervisor 228, home assistant 0.112.x.
This only started to fail after this update. Using 0.111.x worked great.
There are no time stamps in your log - might wast to add that.
[Info] Files will be uploaded to: /Backups/homeassistantautobackups
[Info] Saving OAUTH_ACCESS_TOKEN to /etc/uploader.conf
[Info] Listening for messages via stdin service call...
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
Uploading "/backup/02062a2c.tar" to "/Backups/homeassistantautobackups" by 17 chunks *** FAILED
An error occurred requesting /chunked_upload
Uploading "/backup/1b9b9bcc.tar" to "/Backups/homeassistantautobackups" by 17 chunks *** FAILED
Hi there,
Firstly thanks for this awesome add-on, it’s working brilliantly for me!
I’m running into the problem that my Dropbox account is getting filled up with snapshots...
In the interests of having things automated, could we look at having the script clear out Dropbox snapshots older than a certain date? Looks like there is precedent here: https://stackoverflow.com/questions/41098278/delete-files-after-certain-date-with-dropbox-uploader-sh
[Info] Files will be uploaded to: /HassioBackup/
[Info] Saving OAUTH_ACCESS_TOKEN to /etc/uploader.conf
[Info] Listening for messages via stdin service call...
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
Uploading "/backup/402748e8.tar" to "/HassioBackup/"... FAILED
An error occurred requesting /upload
I just upgraded my hassio install to a shiny new rPi4 4gb. When my {"command":"upload"}
is called and my dropbox account is full, HA becomes unresponsive. Not sure why this didn't happen with my rPi3+... I added a i2c hat, but that shouldn't have any affect. I unfortunately am unable to pull the log since I have to hard reset the pi to get HA back up and running.
First off all thnx for the great addons you make! Much appreciated!!
Can you combine the two addons links for both this package and the mqtt package?
https://github.com/danielwelch/hassio-addons
https://github.com/danielwelch/hassio-zigbee2mqtt
This makes things a bit more cleaner.
Last week or so I have been seeing this in the logs:
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Skipping already existing file "/home-assistant-backups/48e3fb8d.tar"
> Skipping already existing file "/home-assistant-backups/7e741012.tar"
> Skipping already existing file "/home-assistant-backups/93ee508c.tar"
> Uploading "/backup/953ff3f5.tar" to "/home-assistant-backups/953ff3f5.tar" by 8 chunks ........ DONE
> Skipping already existing file "/home-assistant-backups/aa84720f.tar"
> Uploading "/backup/dcdc7d15.tar" to "/home-assistant-backups/dcdc7d15.tar" by 8 chunks ........ DONE
[Info] keep_last option is set, cleaning up files...
[Info] Deleted snapshot 953ff3f5
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Skipping already existing file "/home-assistant-backups/48e3fb8d.tar"
> Skipping already existing file "/home-assistant-backups/7e741012.tar"
> Skipping already existing file "/home-assistant-backups/93ee508c.tar"
> Uploading "/backup/aa84720f.tar" to "/home-assistant-backups/aa84720f.tar" by 8 chunks ........ DONE
> Uploading "/backup/bc61d55e.tar" to "/home-assistant-backups/bc61d55e.tar" by 8 chunks ........ DONE
> Skipping already existing file "/home-assistant-backups/dcdc7d15.tar"
[Info] keep_last option is set, cleaning up files...
[Info] Deleted snapshot aa84720f
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Uploading "/backup/48e3fb8d.tar" to "/home-assistant-backups/48e3fb8d.tar" by 8 chunks ........ DONE
> Skipping already existing file "/home-assistant-backups/7e741012.tar"
> Skipping already existing file "/home-assistant-backups/93ee508c.tar"
> Skipping already existing file "/home-assistant-backups/bc61d55e.tar"
> Skipping already existing file "/home-assistant-backups/dcdc7d15.tar"
> Uploading "/backup/de1eb2d2.tar" to "/home-assistant-backups/de1eb2d2.tar" by 8 chunks ........ DONE
[Info] keep_last option is set, cleaning up files...
[Info] Deleted snapshot 48e3fb8d
48e3fb86 (last example) was actually from 28/3
I isn't even in my backup folder... I check backup folder today and I see
7e741012.tar
93ee508c.tar
bc61d55e.tar
dcdc7d15.tar
de1eb2d2.tar
These are also the only 5 snapshots listed but I bet tomorrow I'll see an old dupe as well....
I can't start this app
My config:
{
"oauth_access_token": "xxxxxxxxx",
"output": "HassioBackup",
"keep_last": 3
}
Thanks for your work creating this addon. I suggest you initiate adding this addon to Community addons so that more HA users are aware of such useful addon.
I`ve been using this addon for some time now but recently I started to notice exceptions in HA 0.78.0
2018-09-22 03:05:00 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /snapshots/new/full request
2018-09-22 03:05:00 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall hassio.snapshot_full (c:e6e1e167fc3742c392fc3b8558ade1e6): name=Automated Backup 2018-09-22>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1127, in _event_to_service_call
await service_handler.func(service_call)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/hassio/__init__.py", line 242, in async_service_handler
_LOGGER.error("Error on Hass.io API: %s", ret['message'])
TypeError: 'NoneType' object is not subscriptable
Snapshot "Automated Backup 2018-09-22" is actually showing in stanpshots list but I did not verify yet if it is not corrupt.
Since Python is not my strength I cannot tell if this is caused by hassio-dropbox-sync addon or some changes in HA.
So I tried using the sync - and I was getting failures. Logging on and debugging I can now see why.
HTTP/1.1
instead of HTTP/2
(as it will now get)HTTP/2 200 OK
, instead of just HTTP/2 200
Once I fix both of these expectations in my code, suddenly my /dropbox_uploader.sh -f /etc/uploader.conf info
command works.
backup works like a charm, but all backups are retained, even after I set the keep_last to 2. It used to work and then it stopped. Logs show nothing special
WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Dropbox Sync
Supervisor log says nothing about the error
First, thanks for the add-on!
I've automated my backups to run Monday, Wednesday, Friday and name the backup files like _Snapshot.tar. Looking at the code, it seems like you are using the -s upload option to skip existing files in Dropbox. Will you be able to provide a setting to not use the -s option so it would just overwrite/update files in Dropbox?
TIA.
I'm getting the following error below in the log during any execution of the addon. I suspect there may be something I need to do related to the new auth settings in Home Assistant, but I'm not certain what needs to be done.
[Info] keep_last option is set, cleaning up files...
Traceback (most recent call last):
File "/keep_last.py", line 47, in
main(args.number)
File "/keep_last.py", line 15, in main
snapshot_info.raise_for_status()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://hassio/snapshots
Hi,
I've just install dropbox-sync on hassio.io 0.65 and got this error while saving the configuration in the Hassio dashboard.
not a valid value for dictionary value @ data['options']. Got {'oauth_access_token': 'xxxxxxxxxxxxxxxx', 'output': '', 'keep_last': ''}
(I've removed the dropbox token for security reasons)
Can you help ?
Thanks
i've just installed the add-on and all but i get this error. what did i do wrong or did i forget something?
starting version 3.2.4
[Info] Files will be uploaded to: /hasssio-backups/
[Info] Saving OAUTH_ACCESS_TOKEN to /etc/uploader.conf
[Info] Listening for messages via stdin service call...
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
No such file or directory: /backup/*.tar
Some error occured. Please check the log.
Hi!
Problem uploading backups to Dropbox.
It works until I reboot HA. Then it stops working. If i renew token then it works until next reboot.
Hello,
I uninstalled the add-on, but I still got new backups every day.
How could I get rid of this ?
I'm on Windows Server 2019 > HyperV > Debian 11 > Docker > HA Supervised.
Thanks !
Michel
Honestly I'm not 100% this problem is with Dropbox Sync addon but for now this is the best guess.
The addon has been syncing a lot of unwanted extra backups lately. I have a scheduled automation that creates a backup every night around 4 am. It worked fine for the first months and now I've gotten couple backups now and then around the 4 am timeslot. Plus multiple more in the last ~2 weeks. Some nights I get 5, some nights just 1.
I'll be happy to provide more info if it would be helpful.
The addon itself is great and somewhat critical to me. My backup files are around 400mb each and my Dropbox's new favorite thing is to shout about storage space being full, so I'd love for this matter to get solved :)
Is possible to add a icon in the ADD-ON ?
Many thanks ;)
Doesn't seem to do anything. Followed instructions but can't figure out how to trigger the dropbox upload.
No info in the addon log. Unsure how to make use of this.
I haven't been able to install the addon from the add-on store on a recent install of hassio. Is there a known fix? Clicking install just spins and stops.
here is all that we see in debug log:
2019-02-01 20:20:02 INFO (MainThread) [homeassistant.components.http.view] Serving /api/hassio/addons/7be23ff5_dropbox_sync/install to 192.168.1.1 (auth: True)
2019-02-01 20:20:03 INFO (MainThread) [homeassistant.components.http.view] Serving /api/hassio/addons/7be23ff5_dropbox_sync/info to 192.168.1.1 (auth: True)
Hi, I never got it to run -unfortunately
The message always showed:
...
{"command": "upload"}
x[Info] Received message with command upload
x[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
x > Uploading "/backup/0c7f8731.tar" to "/Apps/HA2DB-Backup/0c7f8731.tar" by 4 chunks *** FAILED
An error occurred requesting /chunked_upload
An error occurred requesting /chunked_upload
Uploading "/backup/0efc9553.tar" to "/Apps/HA2DB-Backup/0efc9553.tar" by 4 chunks *** FAILED
An error occurred requesting /chunked_upload
Uploading "/backup/22f3b5fb.tar" to "/Apps/HA2DB-Backup/22f3b5fb.tar"... FAILED
An error occurred requesting /upload
Please help me to solve it.
is possible to set how many backup still stay on dropbox and delete olds?
if not, maybe add an option?
Missing repository for an installed add-on
Repository for add-on Dropbox Sync is missing. This means it will not get updates, and backups may not be restored correctly as the supervisor may not be able to build/download the resources required.
Please check the [add-on's documentation]...
My system:
Core 2024.6.2
Supervisor 2024.06.0
Operating System 12.3
Frontend 20240610.0
Hi,
is there a way to use your add-on not only to upload TAR files but also other file extensions ?
Thanks!
This addon was working great , until I upgraded to the new hassio.os 1.5 , now I cannot get it installed from the repository.
Here is the system log under the hassio menu
18-07-20 14:38:36 INFO (SyncWorker_10) [hassio.docker.interface] Pull image dwelch2101/dropbox-sync-aarch64 tag 1.2.0.
18-07-20 14:38:38 ERROR (SyncWorker_10) [hassio.docker.interface] Can’t install dwelch2101/dropbox-sync-aarch64:1.2.0 -> 500 Server Error: Internal Server Error (“readlink /var/lib/docker/overlay2: invalid argument”).
Any idea why I'm getting this error? I have keep_last set to 3.
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Skipping already existing file "/6dfda24c.tar"
[Info] keep_last option is set, cleaning up files...
Traceback (most recent call last):
File "/keep_last.py", line 47, in <module>
main(args.number)
File "/keep_last.py", line 15, in main
snapshot_info.raise_for_status()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://hassio/snapshots
After a new install of this great add-on, it seems uploading the backup .tar files to Dropbox does not work for me.
The add-on runs fine, it receives the command to upload, but treats all files as 'already existing' on Dropbox? Even if the Dropbox app folder is still completely empty.
I use add-on 1.2.0 on hass.io 0.71.0 (installed on a nuc with Ubuntu server 18.04, running in a docker).
I created a new app on Dropbox developers page for this and generated the token, following your instructions on Github.
My config for the add-on is:
{
"oauth_access_token": "dedacted my access token...",
"output": ""
}
The log file shows:
Log
starting version 3.2.4
[Info] Files will be uploaded to: /
[Info] Saving OAUTH_ACCESS_TOKEN to /etc/uploader.conf
[Info] Listening for messages via stdin service call...
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Skipping already existing file "/93d293ce.tar"
> Skipping already existing file "/a98035c8.tar"
> Skipping already existing file "/b1161847.tar"
> Skipping already existing file "/b3254871.tar"
> Skipping already existing file "/cdbf1233.tar"
> Skipping already existing file "/f969d2cc.tar"
> Skipping already existing file "/fa844957.tar"
> Skipping already existing file "/fddc0a72.tar"
Any idea what is going on here?
If the add-on for some reason cannot upload to the dropbox account (e.g. in my case I had an oauth-key that was faulty) and the keep_last option is configured, the addon will still delete snapshots even though the upload failed.
The add-on should cross check if the upload of a specific snapshot was successful and if it was, delete it locally (if keep_last is configured and the snapshot is eligible for deletion.)
`> Uploading "/backup/081caadf.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Uploading "/backup/25edc2b6.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Uploading "/backup/571f7161.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Uploading "/backup/68a6142d.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Uploading "/backup/762fe520.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Uploading "/backup/c1fbefc2.tar" to "/Private/Home Automation/ha-snapshots"... FAILED
An error occurred requesting /upload
Some error occured. Please check the log.
[Info] keep_last option is set, cleaning up files...
[Info] Deleted snapshot 571f7161
[Info] Deleted snapshot c1fbefc2
[Info] Deleted snapshot 762fe520`
The following error shall be reported:
21-02-09 06:30:45 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Dropbox Sync
21-02-09 06:30:46 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Dropbox Sync
Home Assistant OS
Version: 2021.1.4
Supervicor Version: 2021.02.5
In suprevisor's log a message for developer as follows:
WARNING (SyncWorker_7) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Dropbox Sync
This URL seems wrong for my install (on a VM) local domain is expected to be http://homeassistant.local:8123/
> Uploading "/backup/f911cabc.tar" to "/home_assistant_backups/f911cabc.tar"... FAILED
An error occurred requesting /upload
Some error occured. Please check the log.
[Info] keep_last option is set, cleaning up files...
Traceback (most recent call last):
File "/keep_last.py", line 47, in <module>
main(args.number)
File "/keep_last.py", line 15, in main
snapshot_info.raise_for_status()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://hassio/snapshots
{"command":"upload"}
Hi - i have just installed the add-on - it actually works well, but I get these errors in the log:
Timeout on /snapshots/new/full request
and
Error on Hass.io API:
These errors come every time it backs up
Hi all
I've installed this addon and I'm getting this error.
Log is:
[Info] Files will be uploaded to: /hass_b3_backup/
[Info] Saving OAUTH_ACCESS_TOKEN to /etc/uploader.conf
[Info] Listening for messages via stdin service call...
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
> Uploading "/backup/14c13bf3.tar" to "/hass_b3_backup/yyyyyyyyy.tar" by 6 chunks *** FAILED
An error occurred requesting /chunked_upload
My config is:
{
"oauth_access_token": "xxxxxxxx", # app_key in Dropbox developer page
"output": "/hass_b3_backup/", # folder created under Application in Dropbox
"keep_last": 7
}
Is my config correct?
Where should I check to solve this problem?
I've already checked for space available on Dropbox and I have more than 2GB.
Maybe anything related to the folder.
I've created the folder named hass_b3_backup under the Applications folder.
Is it correct?
Thanks
Hi,
I was using this Addon for sone time and it is great.
Recently I noticed that it stared skipping uploading files saying they already there but this is not true. Somehow it thinks the files are already there.
{"command": "upload"}
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
Skipping already existing file "/hassioBackup/"
Skipping already existing file "/hassioBackup/"
Skipping already existing file "/hassioBackup/"
Skipping already existing file "/hassioBackup/"
[Info] keep_last option is set, cleaning up files...
[Info] Deleted snapshot a485d935
Addon version: 1.2.0
when the file already exists in the dropbox is Skipping (correctly), but does not continue sending the next files, as log:
[Info] Received message with command upload
[Info] Uploading all .tar files in /backup (skipping those already in Dropbox)
Skipping already existing file "/18ffbc5a.tar"
Hi
I am not sure if this is maintained anymore, but its still working correctly other than I have noticed that it is no longer respecting the retain number of backups.
I see in the logs this:
[Info] keep_last option is set, cleaning up files...
Traceback (most recent call last):
File "/keep_last.py", line 47, in <module>
main(args.number)
File "/keep_last.py", line 15, in main
snapshot_info.raise_for_status()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://hassio/snapshots
I assume this issue started to occur when snapshots were renamed to backups.
I have no idea how I can change this myself, although I have looked at the code.
Any ideas appreciated.
TIA
Hi!
Great addition to my Hassio set-up!!
I feel like it would make sense to include the date of snapshot creation in the filename or otherwise transfer that to the dropbox backup. Maybe it´s possible to keep original created timestamp when transferring?
I update hassio to latest 0.89.1 all addons were updated except mqtt which also is broken change i guess also feature firs i got error unable to load hassio-dropbox-sync addon. Then i uninstalled it and now cannot reinstall it no matter what i do.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.