Gcd-token.json "no such file or directory" (Linux)

Ok… I’m really at the end of my rope here. I’ve used Duplicacy (CLI) on many different machines for many years now so I would like to think I’m not a complete noob… However, I’ve been messing with this problem for almost a day and a half now and I simply do not know what else to try.

I am setting up a new Duplicacy backup on a Ubuntu server arm64 device and I am backing up to a different/new Google Drive account that I have not used for backups previously. I have my gcd-token.json saved on the machine but every time I provide the path to it when running the ‘duplicacy init’ command, Duplicacy returns the error:

Failed to load the Google Drive storage at gcd://backup/duplicacy/default: open “/opt/duplicacy/prefs/gcd-token.json”: no such file or directory

I’ve tried it with single quotes, double quotes, changed permissions of the file, moved the file to different directories, etc and so on. I’m simply PERPLEXED. Here is my full duplicacy init command:

sudo duplicacy init -pref-dir /opt/duplicacy/prefs -encrypt AmenityRpi gcd://backup/duplicacy/default

I’ve triple checked that the ‘/backup/duplicacy/default’ directory already exists on my Google Drive… I don’t know what else to try. Any advice would be GREATLY appreciated. Thank you!

ubuntu@AmenityRpi:/opt/duplicacy/prefs$ ls -lh gcd-token.json
-rw-r–r-- 1 root root 600 Apr 19 14:52 gcd-token.json

Nevermind… I finally figured it out. You have to provide the path without quotes, which I did MANY times, but every time I did, it would just hang forever without providing any output. I suspect at the time that I was using an improper token file (because Google Drive for Duplicacy was NOT working for me in Firefox… finally got it to work with Chrome). Would definitely be nice if there was some type of output provided from the duplicacy init command if provided a token file it doesn’t recognize or has issues with. You would also think that it would not have any issues with the token path being provided within single or double quotes.

You’d want to run commands like this with -d (debug) flag, which will normally provide a lot more info. E.g. in some cases verbosity is not high enough by default so long running operations (e.g. listing all the chunks on remote) may produce no output without -d, so it looks like it is hanging, while there is work going on in the background.

2 Likes

Thanks for the advice @sevimo. I will definitely do that next time when troubleshooting.