2023-10-16 19:47:37 +02:00
|
|
|
|
Before you enable the gdrivesync plugin follow these guidelines.
|
|
|
|
|
|
|
|
|
|
# Authentication
|
|
|
|
|
Drive API requires OAuth2.0 for authentication. PyDrive2 makes your life much easier by handling complex authentication steps for you.
|
|
|
|
|
|
2023-10-16 21:25:26 +02:00
|
|
|
|
Go to [APIs Console](https://console.developers.google.com/iam-admin/projects) and make your own project.
|
2023-10-16 19:47:37 +02:00
|
|
|
|
|
|
|
|
|
Search for ‘Google Drive API’, select the entry, and click ‘Enable’.
|
|
|
|
|
|
|
|
|
|
Select ‘Credentials’ from the left menu, click ‘Create Credentials’, select ‘OAuth client ID’.
|
|
|
|
|
|
|
|
|
|
Now, the product name and consent screen need to be set -> click ‘Configure consent screen’ and follow the instructions. Once finished:
|
|
|
|
|
|
2024-01-21 11:14:17 +01:00
|
|
|
|
Select ‘Application type’ to be Web application.
|
2023-10-16 19:47:37 +02:00
|
|
|
|
|
|
|
|
|
Enter an appropriate name.
|
|
|
|
|
|
2023-10-16 21:26:47 +02:00
|
|
|
|
Input http://localhost/ for ‘Authorized redirect URIs’.
|
2023-10-16 19:47:37 +02:00
|
|
|
|
|
2023-10-16 19:53:57 +02:00
|
|
|
|
Select the correct oauth scope:
|
|
|
|
|
|
2024-01-21 11:14:17 +01:00
|
|
|
|
- drive.file
|
2023-10-16 19:53:57 +02:00
|
|
|
|
- drive.install
|
|
|
|
|
|
2023-10-16 19:47:37 +02:00
|
|
|
|
Click ‘Create’.
|
|
|
|
|
|
|
|
|
|
Click ‘Download JSON’ and copy the contents to /root/client_secrets.json.
|
|
|
|
|
|
|
|
|
|
Then copy your client_id and client_secret to /root/settings.yaml
|
|
|
|
|
|
|
|
|
|
# Login to google
|
|
|
|
|
|
|
|
|
|
When you have done this please run the following command in your ssh shell:
|
|
|
|
|
|
|
|
|
|
`sudo pwnagotchi google login`
|
|
|
|
|
|
2023-10-16 21:16:14 +02:00
|
|
|
|
And follow the steps, after which you can enable the plugin and let the magic begin.
|
|
|
|
|
|
|
|
|
|
# Functionality
|
|
|
|
|
Set a backup folder in config file
|
|
|
|
|
|
|
|
|
|
It will then upload a zip file there of all your backup files.
|
|
|
|
|
|
2023-10-28 22:27:02 +02:00
|
|
|
|
If you have a new device you only need to log in with Google and enable the plugin, it will then download the previously made backup and reboot.
|