2022
Page History
Setting up G Suite Backup and generating Key Value
Introduction
This document describes the setting up of the DBSync project on a server/local environment and executing it.
...
Setting up GCloud Console Project.
Setting up the server/local environment.
Building and Executing the project.
Demo Login Creds
Reference YoutubeYouTube: https://youtu.be/aFshfKg2jCI
Prerequisites
Before we proceed, there are some prerequisites needed in the environment. Following are those:
JDK 11 (I believe both OpenJDK and Oracle JDK should work)
Maven 3.X
Spring Tool Suite (Not Mandatory, as you can run the app from command line as well)
G Suite Login (Super Admin Login)
MySqlMySQL
Folders created on the server/local environment where the backup should happen.
Setting up GCloud Console Project
The very first step should be to create and setup a GCloud Console Project. Following are the steps to do so:
...
Make sure that you have selected the newly created project from the project selector on the top nav bar.
Once selected, from the left menu, under “APIs & Services” select “Credentials”.
Click “Create Credentials” from the top nav bar and select OAuth Client ID.
Select a “Desktop Application” for now since we do not have this application hosted anywhere.
Give an appropriate name and click “Create”.
Download the client secret on your environment and name it client_credentials.json
Setting up the server/local environment
Once the GCloud project is set up, we should now set up the local environment. Following steps to do so:
The code is pushed on the bitbucket repository: https://bitbucket.org/outsourced-projects/google-cloud-backup/src/master/
The code is pushed on the master branch.
Copy the 2 files downloaded GCloud Project (g_suite_credentials.json and client_credentials.json) and save it under src/main/resources folder.
In MySQL create a new database and enter the credentials in application.properties under src/main/resources
Update the following properties based on the DB Name, and your MySQL setup:
spring.datasource.url
spring.datasource.username
Spring.datasource.password
Create a folder where you want all the backup files to be stored and update the following from application. propertiesProperties:
EML_FILE_PATH
ICS_FILE_PATH
VCARD_FILE_PATH
DRIVE_FILE_PATH
If you want to backup all users then in application.properties set the following property to ALL:
include.users.backup
Else set it to comma separated emails for any specific users you want to take a backup of.
Once the above is done, you are all set to execute the project.
Building and Executing the project
Once the above is set up following process to build and execute the project:
...