I need to backup my server data to Google Drive.
It's a personal account.
I tried to create a service account, initially without any role
Which roles must I give to service account to be able to create and delete folders and files?
I create in my Drive root a folder for rclone, and this folder has an id
1HjnJBoUEpqdV_.....
Actually I have this problem
failed to copy: failed to make directory: googleapi: Error 404: File not found: 1HjnJBoUEpqdV_..., notFound
I cannot autoconfigure server so I choosen to create json file for a service account and used it.
Every service account is effectively a new user with its own home directory and its own 15GB initial quota - that's why you can't see any of your files.
To access your files you need to use --drive-impersonate you@gmail.com to tell the service account to look at your files rather than its own files.
However I don't think this works with google drive personal accounts - at least it didn't last time I tried it. It only works with multi-user enterprise accounts (or whatever they are called today!).
I'm not a google drive expert though so maybe there is a way of getting it to work.
You need access to a GSuite Admin console to give the service account permissions needed to see the Google Drive stuff. You can login without issue but wouldn't be able to use the Drive API.
I'd strongly advise against using a service account with your personal account. I can't be more clear, but do as you like. You'll end creating more problems than you are solving.