Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using Google drive via rclone #1119

Open
shbs9 opened this issue Apr 16, 2024 · 5 comments
Open

Problem using Google drive via rclone #1119

shbs9 opened this issue Apr 16, 2024 · 5 comments
Labels
C-question Category: Further information is requested

Comments

@shbs9
Copy link

shbs9 commented Apr 16, 2024

Hello Rustic Team,

I hope everything is going well. I'm opening this issue on behalf of the CyberPanel team.

We're currently experiencing an issue from Rustic's end. We've integrated Rustic with our new backup system, but despite trying different versions of rclone, we're still unable to create the backup. Below are the details from the terminal.

[root@dockertesting ~]# sudo -u wpmau6540 rustic init -r rclone:'unasirdrive':wpmautic.net --password ""
[INFO] using no config file, none of these exist: /home/wpmautic.net/.config/rustic/rustic.toml, /etc/rustic/rustic.toml, ./rustic.toml
[INFO] rclone output: 2024/04/16 13:33:35 Failed to create file system for "unasirdrive:wpmautic.net": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token: unauthorized_client: if you're using your own client id/secret, make sure they're properly set up following the docs

error: backend rclone Backend cannot be loaded: rclone exited with ExitStatus(unix_wait_status(256))
[root@dockertesting ~]#

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Apr 16, 2024
@usmannasir
Copy link

I will add further context to this: It works with sftp backend, but it is not working with Google drive backend. We've tried different os and different rclone versions. But same problem occurs.

@aawsome
Copy link
Member

aawsome commented Apr 16, 2024

@shbs9 Did you try if rclone is able to successfully access the repository? Commands like rclone ls or rclone copy should work as expected.

For me this seems to be an rclone configuration issue. In that case you should fix the rclone config and rustic should work.

As a side note: With rustic 0.7.0 Google Drive is directly (i.e. compiled-in; no foreign binary needed) supported using the opendal backend. But this needs to be configured using a config file - configuration via env variables is available in the latest betas but not yet released. For configuration details see https://nightlies.apache.org/opendal/opendal-docs-stable/docs/rust/opendal/services/struct.Gdrive.html and https://github.com/rustic-rs/rustic/tree/main/config

@aawsome aawsome added C-question Category: Further information is requested and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Apr 16, 2024
@aawsome aawsome changed the title Issue in rustic Problem using Google drive via rclone Apr 16, 2024
@shbs9
Copy link
Author

shbs9 commented Apr 17, 2024

Thank you for getting back to us I checkedrclone ls it seems working fine let me check the other part and we will get back to you.

@shbs9
Copy link
Author

shbs9 commented Apr 18, 2024

All seems set from the rclone end can configuration and all but still we cant create can you guide us more?

@aawsome
Copy link
Member

aawsome commented Apr 18, 2024

From

[INFO] rclone output: 2024/04/16 13:33:35 Failed to create file system for >unasirdrive:wpmautic.net": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token: unauthorized_client: if you're using your own client id/secret, make sure they're properly set up following the docs

error: backend rclone Backend cannot be loaded: rclone exited with > ExitStatus(unix_wait_status(256))

this seems like rclone exits with an error code due to the mentioned problem. rustic here only displays the ouput rclone provides. So you have to find that rclone problem. Are you sure you are really using exactly the identical rclone configuration when you run rclone standalone and when you run it via rustic? To get more debug output from rclone you can set the env variable RCLONE_VERBOSE=2, e.g. run RCLONE_VERBOSE=2 rustic ..... Hope this leads you to the root cause of the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants