Issue creating Vault exports?

128 views
Skip to first unread message

Sam Woodhouse

unread,
Feb 20, 2019, 4:55:58 PM2/20/19
to GAM for G Suite
Hi all,

Back with questions about Vault again, sorry. Not API related at least.

Usting GAMADV-XTD and I'm trying to create exports using the following command:

gam create export matter "matterName" name "name" corpus mail account email@domain.com timezone "Europe/London" format mbox

However, this seems to not be working, in the vault webpage the exports sit for a while and then get a little red exclamation mark next to them. If I run the exact same export manually through the GUI is works fine.

The page doesn't suggest what the problem might be and hovering the error icon doesn't give any error information.

Any suggestion on where I might be going wrong?

Kind Regards,
Sam

Jay Lee

unread,
Feb 20, 2019, 5:02:07 PM2/20/19
to google-ap...@googlegroups.com
What if you do a "gam info export" on one created via GAM and one created via GAM and one created via UI, do they show any differences?

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/3b0a86b2-6310-4548-8274-b618e7d2a1d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam Woodhouse

unread,
Feb 22, 2019, 8:10:47 AM2/22/19
to GAM for G Suite
Hi Jay, 

Thanks for your response, it seems to be the way that the script is writing out details required by the command. 

It seems to be outputting variables slightly wrong when I'm substituting them through bash.

the following seems to work fine direct into the command line

gam create export matter "matterName" name "name" corpus mail account email@domain.com timezone "Europe/London" format mbox 

However, doing the following using a for loop iterating through a csv it just falls over. 

for line in $file
do
    echo
"Starting export for $line"
   $gam create export matter "$matterName" name "$line - mail" corpus mail account "$line" timezone "Europe/London" format mbox >> /users/"$account"/bin/gamadv-xtd/deletions/exports.csv
   echo
   sleep 60
done

I'm fairly new to bash, and don't consider myself a programmer by any means, but the above bit of script I have used a few weeks back when I was trying to create exports for ~100 users. I remember it being fairly picky back then but when copying it straight from what I did last time and adding it into my new one it just doesn't work properly.

If you have some pointers as to how I can get exports wrote through bash using a for loop from a csv then I would be over the moon.

Kind Regards,
Sam


On Wednesday, 20 February 2019 22:02:07 UTC, Jay Lee wrote:
What if you do a "gam info export" on one created via GAM and one created via GAM and one created via UI, do they show any differences?

On Wed, Feb 20, 2019 at 4:56 PM Sam Woodhouse <sam.wo...@coopdigital.co.uk> wrote:
Hi all,

Back with questions about Vault again, sorry. Not API related at least.

Usting GAMADV-XTD and I'm trying to create exports using the following command:

gam create export matter "matterName" name "name" corpus mail account email@domain.com timezone "Europe/London" format mbox

However, this seems to not be working, in the vault webpage the exports sit for a while and then get a little red exclamation mark next to them. If I run the exact same export manually through the GUI is works fine.

The page doesn't suggest what the problem might be and hovering the error icon doesn't give any error information.

Any suggestion on where I might be going wrong?

Kind Regards,
Sam

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Jay Lee

unread,
Feb 22, 2019, 8:15:59 AM2/22/19
to google-ap...@googlegroups.com
Don't create an export per-user, batch them all into one export.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Sam Woodhouse

unread,
Feb 22, 2019, 8:18:44 AM2/22/19
to GAM for G Suite
I'd considered that, how easy is it to grab the individual mail exports out of the end file? We need to be able to put each individuals archive into individual folders on a Team Drive.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Jay Lee

unread,
Feb 22, 2019, 9:00:12 AM2/22/19
to google-ap...@googlegroups.com
See:


each users mailbox will be it's own mbox file though you may get multiple mbox files for one user.

Jay

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Sam Woodhouse

unread,
Feb 22, 2019, 9:13:31 AM2/22/19
to GAM for G Suite
I'll give that a try then, as long as the name of the file comes out with the email address within it I should be able to filter through using bash and move them to the Team Drive.

Thanks for your help Jay
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Sam Woodhouse

unread,
Feb 22, 2019, 10:00:49 AM2/22/19
to GAM for G Suite
Just to follow up (not asking for more help), the issue I was having within the script was that the csv was appending a '\r' my variables when bash was interpreting them. I've added a line to trim '\r' from the csv and it's working fine now.

Think I'm going to stick to individual exports just cause I've been basing the rest of the automation process on that being the way forward.

Thanks again for your help though Jay.
Reply all
Reply to author
Forward
0 new messages