Skip to main content

Backing up with an unlimited Google Drive account.

It occurred to me when the unlimited Google Drive accounts for Education were announced a while back that I could use a 'backup' account to cloud backup my local server infrastructure. So I've just set this up now that we have unlimited accounts. Below are the basic steps I've taken.

  • Create an account specifically for backups - call it whatever you want.
  • Install the Google Drive Sync Tool on a local server (one that you perhaps use for backups anyways).
  • Sign into the Sync Tool with the backup users account.
  • Go to advanced settings:


  • Select 'Only sync some folders on the computer' - so you are only going to sync folders with things you want to backup. You could create a specific Google Drive folder and turn this into a network share so that other servers can copy backups into it (which is what I've done).
  • On other servers - if you run Windows Server Backup - you could send the backup to this network share. This will mean backups as synced to the cloud as they appear.
  • Leave a 'backup user' logged onto the server in question - otherwise the sync tool won't run.
  • You could also copy backup files that other servers make to this share via a scheduled task - see example below:

So I have a server that runs an SQL database and backs it up once a day. The backups are stored on the D drive of this server. I've set a scheduled task to run the following batch file at 1.00am every day:


This takes the entire contents of the folder that contains the backups and puts in into a network share that also happens to be the Google Drive folder of my backup user. The /MIR switch simple means it will mirror the contents of the original folder. Once run, the Google Drive sync tool pushes the updates to the users drive as a new version of the file.

So far this all seems to work fine - happens overnight in conjunction with our local backups and means we have another location for backups to live. We will see how it goes in the coming months.

Comments

Popular posts from this blog

Delete a specific email using GAM

If a user send an inappropriate email to a loads of people or get stung by some sort of email exploit you can quickly delete the email from all of the recipients using a GAM command. Step 1 - get the email header Go into Google Vault and search for the offending user or someone known to have got the message. Click show details and grab the email ID. This will be a long string of characters followed by @mail.gmail.com Step 2 - find out who has the email Go into Google Vault and find the original message sent by the offending user. Look at the details to see who got it. Copy the list and dump it into a spreadsheet. Clean up to just a list of emails with a column header 'mail'. Save as a csv file. Step 3 - delete messages with GAM Put your CSV file in your GAM folder - this e.g. assumes its called mail.csv Run: gam csv mail.csv gam user ~mail delete messages query rfc822msgid: MESSAGEIDHERE doit The alternative nuke option is: gam all users delete messages query rf

Adding subdomains to G Suite

This is how I add subdomains (so basically new schools) to out G suite setup. I've got these steps documented on a scruffy set of notes that I've now got in Keep - so time to document them - for myself as much as anyone else! Steps in order (roughly) Add the new domain Verify the new domain Add MX records to hosting Add SPF record for Google to hosting Turn on email authentication Add DMARC record to hosting Setup custom Directory and restrict students OU to this. Create an admin quarantine for the domain. Configure SPAM setting for the domain. Turn on and off services as appropriate. Map a blank Google Site to the naked domain - if required. Setup some basic groups - allstaff, allusers (for directory) and students with appropriate permissions. Deploy custom wallpapers. So the steps in a bit of detail: Add the new domain & Verify ownership Click on Domains in the admin console: Add/remove domains followed by "add a domain" At this

My favorite GAM commands - well a few of them at least!

Where would be without GAM? Paying for expensive syncing tools or doing tedious manual tasks in the admin console. GAM can automate most things you might want to do in G Suite. So these are a few of my favourite commands - one I use either as part of a batch file - or just standalone. There are loads more - but these are ones that are used daily. Classroom Create a spreadsheet of all your domains classes -  gam print courses todrive Create a spreadsheet of a teacher's classes:  gam print courses teacher fred@mydomain.com todrive Bulk create classes: gam csv classes.csv gam create course alias ~alias name ~alias section ~subject teacher ~teacher status ACTIVE where classes.csv is a list of classes you want to make. Add teachers: gam csv teachers.csv gam course ~alias add teacher ~teacher Add students: gam csv students.csv gam course ~alias add teacher ~student Sync Students (in this example to a group - but could be an ou/csv file) gam csv groups.csv gam course ~g