jcwillox / hassio-rclone-backup

Home Assistant addon to automatically sync backups to remote locations using Rclone
MIT License
115 stars 19 forks source link

Issue getting pcloud to work #25

Closed lbouriez closed 1 year ago

lbouriez commented 1 year ago

The problem

Hello, I am trying to setup the addon following the documentation, I am pretty new to rclone. My conf is as follow:

[pcloud]
type = pcloud
client_id = My_CLIENT_ID
client_secret = MY_CLIENT_SECRET
username = XXX
password = XXX
token = XXX <= Access token that I got from PCloud using postman
use_trash = false

[hassbackup]
type = crypt
remote = pcloud:Backup/Home Assistant
filename_encryption = off
directory_name_encryption = false
password = XX
password2 = XX

When I open the gui, if i try to see the conf, I get an error: image

What version of Rclone Backup has the issue?

3.0.0

What version of Home Assistant are you running?

2022.11.5

What type of installation are you running?

Home Assistant OS

If you're running HA OS/Supervised, what version of the Supervisor are you running?

2022.11.2

Example YAML snippet

- name: Sync Daily Backups
  schedule: 10 4 * * *
  command: sync
  sources:
    - /backup
  include: []
  exclude: []
  flags: {}
  destination: "hassbackup:"

Anything in the logs that might be useful for us?

10 4 * * * sync "Sync Daily Backups"; /backup -> hassbackup:
2022/12/01 17:13:01 ERROR : rc: "operations/list": error: failed to configure Pcloud: invalid character 'Y' looking for beginning of value
2022/12/01 17:13:14 NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
2022/12/01 17:13:14 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=v9TA12NfpFG5CmQJq3Slxw
2022/12/01 17:13:14 NOTICE: Log in and authorize rclone for access
2022/12/01 17:13:14 NOTICE: Waiting for code...

Additional information

No response

lbouriez commented 1 year ago

I tried with OneDrive, getting the same issue :(

jcwillox commented 1 year ago

Hmm, well it looks like your config may be invalid try placing double quotes around any strings contain Y.

You could also try it with the rclone comma d line separately if you want.

lbouriez commented 1 year ago

It doesnt work, when I use the gui, I go in the conf, click on next next and it immediately redirect me to the gui main page. In the log I get this: image I made this gif to show you the redirect: rclone Please help

lbouriez commented 1 year ago

Hello @jcwillox , could you help me, I really tried everything. As soon as the gui should open a page I get an error notification. In the log I get that:

2022/12/27 14:38:01 NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config. 2022/12/27 14:38:01 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=p9uJCOQra3x7

Obviously it doesnt work, this port doesnt seems open and we are using ingress.

Pleeeease help :)

PatrickGlesner commented 1 year ago

Hello @lbouriez,

I'm also newbie with RClone. I'm trying understand the doc. In your config, you wrote "Access token that I got from PCloud using postman". How and where did you do that ? Could you follow the doc Configuring rclone on a remote / headless machine? I'll try that on my config this week. Best regards, Patrick.

PatrickGlesner commented 1 year ago

It works!

I followed this rclone/pcloud doc, installed Rclone on my MacBook, got the token (/!\ format : {{"access_token":"•••••••••••••••••••••••••••","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}} ), configured hassio-rclone-backup and voilà!

I hope you will solve your problem.

Best regards, Patrick.

PS: client_id and client_secret are not needed.

lbouriez commented 1 year ago

Hello, I didnt update my message but yes, i got it working in a similar way, I was just expecting the gui to make the process simpler...

AlecRust commented 1 year ago

@lbouriez would you mind sharing how you worked around this?

lbouriez commented 1 year ago

@AlecRust , i didn't use the GUI but the manual setup of rsync. For that I needed to install rsync in my windows machine to generate the token. 1- start the manual setup in the docker container 2- when it asks for the token, go on rsync in your windows machine and generate it