Dropbox integration

Have you completed the necessary steps for Dropbox and obtained the oauth token? If it’s creating the backup but failing to upload to Dropbox I assume that must be a credential or configuration problem.

When you click on the add-on you should see something like this under the Config tab (has to be changed to your info of course).

oauth_access_token: PASTE_YOUR_VERY_LONG_TOKEN_HERE_AND_HIT_SAVE
output: /HA-Backups/
keep_last: 3

Make sure the first line has your correct credentials and hit save.

Yes, only not sure correct backup path, because application has access only to own path.

Well I think that’s likely the problem you’re facing - you might either have the wrong backup path specified in the addon configuration, wrong oauth token, or the wrong permissions on the Dropbox side. None of us can really help you with those parts.

The Home Assistant side of things appears to be working, the automation made the snapshot and attempted to upload it. But failed due to Dropbox.

If you copied this part from the add-on documentation: "<YOUR_TOKEN>" make sure that you removed the < and > characters from that as well. It should just be your token between quotes.

You could also try uninstalling the add-on and re-installing.

Problem is, to which path is uploader script installed, run it and try unlink Dropbox integration and link it again, because of missing /etc/uploader.conf file.

You do not have to run any SSH commands or deal with uploader script path using this add-on, it’s all done completely through the user interface. I’m pretty sure you just have the wrong values in the add-on configuration.

Can you go here and click your app: https://www.dropbox.com/developers/apps/

Toward the top of the page is a short “App key” that is 15 characters long. Make sure that you’re NOT using that one and that you’re NOT using the “App secret” key either which is also 15 characters. It has to be the generated access token underneath. Your token is supposed to be very long, like 64 characters.

Make sure that is the case. You can also go to “Analytics” tab on the same Dropbox website and check “API calls per day” chart at the bottom… If it says 0 that means you have probably misconfigured the details.

I found tip today morning and I’ve been tested it now. Hass.io Add-on: Upload hassio snapshots to Dropbox
This was the problem. After deleting characters <>, Dropbox backup has been sent. Folder path is always from the starting folder to which has access. So it works now.

Thank you for your help in this.

1 Like

Glad you got it working! :slight_smile: Just two small tips:

  1. The five minute delay you have been using for testing purposes should be increased to something longer, like 20-30 min just to be safe. Backups are happening quickly for you right now, but as your database grows in size the backups could take longer. And you don’t want to upload an incomplete backup to Dropbox.

  2. When you use the keep_last feature of this add-on, it deletes the older backups locally from your Pi 4’s SD card, but it will NOT delete them from your Dropbox account. The Dropbox folder will have every backup you’ve made and it will be up to you to delete those manually. So just keep that in mind otherwise you could run out of space on your Dropbox.

1 Like

Hi folks

I have done all the steps and used the suggested automation. However, I get the following error

Anyone experiencing the same?

Uploading “/backup/0a8c0278.tar” to “/HomeAssistantBackup/0a8c0278.tar”… FAILED
An error occurred requesting /upload
Uploading “/backup/339f1aa2.tar” to “/HomeAssistantBackup/339f1aa2.tar”… FAILED
An error occurred requesting /upload
Uploading “/backup/5df09d74.tar” to “/HomeAssistantBackup/5df09d74.tar”… FAILED
An error occurred requesting /upload
Uploading “/backup/8ab1d59e.tar” to “/HomeAssistantBackup/8ab1d59e.tar”… FAILED
An error occurred requesting /upload
Uploading “/backup/e03872e0.tar” to “/HomeAssistantBackup/e03872e0.tar”… FAILED

I have the same issue and cant get it to work :frowning:

But from what I can find, this addon is discontinued so, that’s to bad :frowning:

Would REALLY like to backup to Dropbox…

Maybe it’s because of the Dropbox API?
I can only select this one

I recently installed this add-on to my home assistant instance and it is working as expected. Some things to note:

  • It makes sense to use the Scoped App (App Folder) permission level. Using this scope means setting the add-on’s output setting to / writes backups to app/[App-folder-name].
  • In the Oauth 2 section of https://www.dropbox.com/developers/apps be sure to generate an access token to use with Access token expiration set to no expiration vs the default of Short-lived which is only 4 hours long. When the access token is expired, you will see failures similar to FAILED An error occurred requesting /upload

Hope this helps someone!

Thank you for sharing this automation. Automations are the next thing I need to figure out how to write from scratch. Really appreciate this.

Do you have any idea why I’m not getting the following error in Supervisor?

21-12-31 10:27:19 ERROR (SyncWorker_7) [supervisor.docker.interface] Container addon_core_zwave_js is not running

I really do not understand what addon_core_zwave_js has to do with anything, but it started after this Dropbox add-on was installed. Any ideas?

@diffhome Also, thanks for the clarification on the folders. I initially put the Dropbox folder name in the add-on folder field, but it makes sense that it should be / since there are only permissions for that specific folder designated on the Dropbox app creation page.

@SeanM Maybe you have an idea?

This Add-on is no longer working for me due to it not supporting the use of short lived tokens that Dropbox moved to.

I’ve developed my own Add-on to replace it:

1 Like

I just installed the Dropbox backup addon by diffhome posted above. Can confirm it works. Thank you!

1 Like

Hi,
I have now added “matthewhadley” addon to backup to Dropbox.
If I do service call for both the Snapshot and the Dropbox transfer it works.
Snapshot service call:

service: hassio.backup
data_template:
  name: Ha_Backup_{{ now().strftime('%Y-%m-%d') }}

Dropbox backup service call:

service: hassio.addon_stdin
data:
  addon: 719b45ef_dropback
  input: sync

But I can’t get it to work from my “automation.yaml” file
What I’m doing wrong?

#Automated backups, snapshots every wednesday night to Dropbox
- alias: System - Weekly Dropbox Backups
  intital_state: "on"
  trigger:
    platform: time
    at: "03:00:00"
    condition:
      condition: time
      weekday:
        - wed
    action:
      - service: hassio.backup_full
        data_template:
          name: Ha_Backup_{{ now().strftime('%Y-%m-%d') }}
      - delay: "00:30:00"
      - service: hassio.addon_stdin
        data:
          addon: "719b45ef_dropback"
          input: "sync"

On the face of it, this looks like an indentation error - condition and action should be at the same indentation level as trigger:

#Automated backups, snapshots every wednesday night to Dropbox
- alias: System - Weekly Dropbox Backups
  intital_state: "on"
  trigger:
    platform: time
    at: "03:00:00"
  condition:
    condition: time
    weekday:
      - wed
  action:
    - service: hassio.backup_full
      data_template:
        name: Ha_Backup_{{ now().strftime('%Y-%m-%d') }}
    - delay: "00:30:00"
    - service: hassio.addon_stdin
      data:
        addon: "719b45ef_dropback"
        input: "sync"

Otherwise, your code looks identical to what I use successfully.

Yes, I discover also that the indentations were wrong. But it still not working :thinking:

By ‘not working’ , do you mean the automation is not running at all? Or that it is running, but the services are not being called? What does the automation trace say? (Settings > Automations & Scenes > click on the 3 dots next to the automation name > Traces)

EDIT: just noticed that initial_state is misspelled as ‘intital_state’

The automation is not running at all.
And this automation is not in the list, Settings > Automations & Scenes
Could it has something to do with the misspelling?
I will correct the spelling and try