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

Is it possible to use --service-account? #17

Open
c-hri-s opened this issue Aug 23, 2023 · 1 comment
Open

Is it possible to use --service-account? #17

c-hri-s opened this issue Aug 23, 2023 · 1 comment

Comments

@c-hri-s
Copy link

c-hri-s commented Aug 23, 2023

I'd like to move some backups from a dedicated server to this container, however they are configured to use --service-account (https://github.com/GAM-team/got-your-back/wiki#--service-account).

The command I use is as follows:
gyb --email [email protected] --service-account --local-folder /mnt/backup/gmail/[email protected]

Is it possible to configure this container to call gyb in this manner, or is it fixed to the standard 3-legged OAuth authentication?

Thanks

@awbn
Copy link
Owner

awbn commented Aug 23, 2023

It should work, this container is just a wrapper around gyb.

I haven't explicitly tested it but try the following:

  • Per the GYB wiki, add/edit the oauth2service.json file in <local config folder>/data
  • Try running docker run -it -e [email protected] -e NOCRON=1 -v <local config folder>:/config awbn/gyb /app/gyb --action estimate --service-account

If that works you can add this as part of the default cron backup jobs using container env variables:

  • JOB_FULL_CMD=/app/gyb --action backup --service-account
  • JOB_INC_CMD=/app/gyb --action backup --search "newer_than:3d" --service-account

If it all works correctly, it would be easy to add this as an extra environment variables (e.g., -e USE_SERVICE_ACCOUNT=1?) to have the wrapper append --service-account automatically without overriding the cron command defaults. Feel free to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants