forked from larsen161/google
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# Purpose: Backup multiple email accounts, compress, upload to Drive | ||
|
||
# Requirements | ||
# GAMADV-XTD3 - https://github.com/taers232c/GAMADV-XTD3/wiki | ||
# GYB - https://github.com/jay0lee/got-your-back/wiki | ||
# 7z - sudo apt-get install p7zip-full | ||
|
||
# Set some broad use case variables | ||
today=`date +%Y-%m-%d` | ||
|
||
# Set the GYB variables | ||
# Set your gyb path and gybdata values. gybbase is default format used | ||
gyb=/home/steve/gyb/gyb | ||
gybbase=GYB-GMail-Backup- | ||
gybdata=/home/steve/gyb/GYB-GMail-Backup- | ||
|
||
# Set the GAM variables | ||
# Change your user, gam path, shared drive ID | ||
user=steve | ||
gam=/home/steve/bin/gamadv-xtd3/gam | ||
shared_drive=0ABxUabcdefgUk9PVA | ||
|
||
# Backup, Compress, Upload files | ||
[email protected] | ||
$gyb --email $email | ||
7z u $gybdata$email.7z $gybdata$email | ||
$gam user $user add drivefile localfile $gybbase$email.7z teamdriveparentid $shared_drive teamdriveparentname $today | ||
|
||
[email protected] | ||
$gyb --email $email | ||
7z u $gybdata$email.7z $gybdata$email | ||
$gam user $user add drivefile localfile $gybbase$email.7z teamdriveparentid $shared_drive teamdriveparentname $today |