Automate backup of Google Apps accounts
Hello,
I am trying to write a script that automates the backup of Google Apps accounts say I have the following 5 users: bob sue anthony james carl I want to run getmail to an mbox file for each of them.... here is my getmail configuration: Code:
retriever] Here is my thought process: 1) Search the file above (getmail.gmail) for the first '@' symbol and replace whatever comes right before it with 'bob' (or the first element in an array perhaps) 2) create new mbox file for email storage perhaps using name for convention 3) Run getmail 4) After gmailmail is finished, repeat. I can't figure out how to do step one and two! Find an replace name@goo.com to name2@goo.com and find and replace path = ~/gmail-archive/name1.mbox with * name2.mbox Code:
#/home/bin/bash |
Could do something like this (although a bit overly simplified)-- make a template for each user with values that are consistent but easily replaced... like template@dom.com and template then run the script:
config: Code:
[retriever] Code:
#!/bin/bash 0 * * * * /usr/local/sbin/archiver.sh |
Can I assign a file to the variable? A file with a list of names
e.g bob jill samson jack susie |
sure:
Code:
core:~/test/test27$ cat test2.sh Code:
VAR=$(cat /list-of-stuff) Code:
#!/bin/bash setup.list Code:
bob@bob.net:billybob:fredfredburger Code:
#!/bin/bash |
All times are GMT -5. The time now is 03:08 PM. |