Code Monkey home page Code Monkey logo

hassio-dropbox-sync's People

Contributors

danielwelch avatar keesschollaart81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hassio-dropbox-sync's Issues

Unable to add it to HACS

Hi, just tried to add the repo to my HACS and this is the error message I get:
Repostitory structure for master is not compliant
What could I try to solve this?
Screenshot_20200816-155317

Cheers to anyone willing to help me! 😃

keep_days option doesn't remove any local snapshots

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.

Update to 0.112.x uploads fail

@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

error no backup dropbox Home Assistant 0.102.3

[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

Brings rPi 4 to it's knees if Dropbox full

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.

Files being added then deleted under older than 5 day rule.....

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....

Dropbox Sync won't start

I can't start this app

My config:

{
"oauth_access_token": "xxxxxxxxx",
"output": "HassioBackup",
"keep_last": 3
}

TypeError: 'NoneType' object is not subscriptable Exception

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.

Fails because it expects HTTP/1.1

So I tried using the sync - and I was getting failures. Logging on and debugging I can now see why.

  1. It expects HTTP/1.1 instead of HTTP/2 (as it will now get)
  2. Even if I change it to HTTP/2, it expects 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.

keep_last doesn't work

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

Add option not to skip existing files

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.

Error deleting old backups when keep_last is set

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

unable to configure.

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

no such backup file?

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.

An error occurred requesting /upload

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.

Add-on uninstalled but still backuping

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

Suddenly multiple extra backups?

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.

  1. There are no extra snapshots in the Hass.io snapshot UI.
  2. All the backup filenames and file sizes in the Dropbox folder are different.
  3. I run Hass.io on Rpi
  4. I've had multiple different Hass.io versions while this problem has been occurring but I've mostly updated to the newest version within a week of it's release.
  5. Today a friend of mine mentioned he had the same problem. He hasn't touched his very minimal configuration / setup in weeks and the problem started out of nowhere for him too.

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 :)

won't install

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)

FAILED An error occurred requesting /chunked_upload

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.

Keep On Dropbox

is possible to set how many backup still stay on dropbox and delete olds?

if not, maybe add an option?

Issue since upgrading to HA Core 2024.6 - Repository for add-on Dropbox Sync is missing

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

Won't install under Hassioos 1.5

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”).

403 Client Error: Forbidden for url: http://hassio/snapshots

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

All local backup files are "Skipping already existing file" even if Dropbox folder is empty!

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 upload fail and keep_last is configured, it will still delete those snapshots locally

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`

Errror in supervisor log - config 'startup' with 'before' is deprecated.

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

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://hassio/snapshots

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"} 

Error : Timeout on /snapshots/new/full request

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

*** FAILED An error occurred requesting /chunked_upload

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

Skipping files that are not backed up

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

Stop if file exists

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"

No longer respecting the retain

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

Snapshot creation date in filename or timestamp

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?

Addon broke after update

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.