Skip to content

Commit

Permalink
initial code
Browse files Browse the repository at this point in the history
  • Loading branch information
larsen161 authored Jul 30, 2019
1 parent c09cc5a commit 962c748
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions email-backup-compress-upload.sh
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

0 comments on commit 962c748

Please sign in to comment.