{"id":300,"date":"2020-07-20T12:41:22","date_gmt":"2020-07-20T16:41:22","guid":{"rendered":"https:\/\/starshade.ca\/wordpress\/?p=300"},"modified":"2020-12-23T16:42:49","modified_gmt":"2020-12-23T21:42:49","slug":"g-suite-account-archival-using-vault-gam","status":"publish","type":"post","link":"https:\/\/starshade.ca\/wordpress\/g-suite-account-archival-using-vault-gam\/","title":{"rendered":"G Suite Account Archive-to-Drive (using Google Vault + GAM)"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"208\" src=\"https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/07\/blog.png\" alt=\"\" class=\"wp-image-359\" srcset=\"https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/07\/blog.png 400w, https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/07\/blog-300x156.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure><\/div>\n\n\n\n<p>The G Suite offboarding features leave much to be desired, and IT teams will often end up bringing in services such as BetterCloud to automate the process. It is rare that <a href=\"https:\/\/github.com\/jay0lee\/GAM\"><strong>GAM<\/strong><\/a> cannot solve a G Suite problem, so here is a GAM script that takes care of archiving a user&#8217;s email and\/or Google Drive files, which would be run after the 1 or 3 month <em>keep account active for forwarding\/email delegation\/OOO greeting<\/em> period. In its current form it must be run from CLI, however a batch-run script is also included for convenience.<br>There does not seem to be any way to save the Vault export directly to Google Drive, so this workflow downloads the files and re-upload them programatically.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/12\/User-Archiving-Grid-1024x207.png\" alt=\"\" class=\"wp-image-419\" srcset=\"https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/12\/User-Archiving-Grid-1024x207.png 1024w, https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/12\/User-Archiving-Grid-300x61.png 300w, https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/12\/User-Archiving-Grid-768x155.png 768w, https:\/\/starshade.ca\/wordpress\/wp-content\/uploads\/2020\/12\/User-Archiving-Grid.png 1144w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Archiving Users in G Suite<\/figcaption><\/figure>\n\n\n\n<p><br>The script runs on the following basis:<br>1. Creates a Vault export<br>2. Waits for export to finish<br>3. Downloads the export files<br>4. Compresses the downloaded files<br>5. Uploads the archive to a specified Google Drive folder or shared drive<br>6. Deletes the local temporary files<br>7. Optionally deletes the user in G Suite<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/zk-1\/5d796c054bea50c65feddcd6ce12d5cb.js\"><\/script>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<script src=\"https:\/\/gist.github.com\/zk-1\/7a53ad7dbb9df3f76a0a6677e926b79a.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>The G Suite offboarding features leave much to be desired, and IT teams will often end up bringing in services such as BetterCloud to automate the process. It is rare that GAM cannot solve a G Suite problem, so here is a GAM script that&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":359,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,46,48],"tags":[52,55,54,85,50,84,56,51],"class_list":["post-300","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cli","category-g-suite","category-macos-it","tag-archive","tag-drive","tag-email","tag-g-suite","tag-gam","tag-mail","tag-offboarding","tag-vault"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=300"}],"version-history":[{"count":36,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/posts\/300\/revisions\/427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/media\/359"}],"wp:attachment":[{"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/starshade.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}