Monthly Archives: February 2013

Create A BootCamp Partition From The Command Line

As a Mac admin in a mixed environment. Most of my users are being boot camped and running windows 7. While I have ways to image machines via Deploy Studio sometimes I just need to do a one off and Boot Camp a partition and then use winclone to install an image.

After Mac OS X 7.1 Boot Camp requires a physical CD to finish, you no longer have the options to “Quit and install later”. That just takes way to longer for administrators. So here’s a hand command for the terminal to partition the drive so you can reboot from an external and use winclone.

diskutil resizevolume /dev/disk0s2 xxG MS-DOS FAT xxG

– replace first xxG with size of the mac partition
– replace second xxG with size of windows partition
– any extra space goes to the windows partition ( 250G drive, 25g for mac, 200 for windows, add’s the left over 25G to windows)

Example:

diskutil resizevolume /dev/disk0s2 30G MS-DOS FAT 200G

– for a 250 GB SSD: creates a 30GB Mac partition, and 200GB Windows partition, anything left over will be added to the windows partition

After running the command, boot off a mac image with winclone installed and image the windows partition as normal.

Use Backupify to export/import Google Apps data back into Apple Mail

I just started this new service called Backupify for our senior management. We are Google Apps users mainly using desktop IMAP clients to access mail. Occasionally users delete things thinking that since they are not in the Google web interface it doesn’t really delete it. As an Administrator we’re always pressed with trying to prevent bad things from happening to our users. Enter Backupify.

I see this service planning a couple of roles. First it’s a complete backup of a users Google Apps account, including calendars, contacts, and drive. Second, it’s hosted by Amazon not Google which from a disaster recovery or business continuity stand point makes a lot of sense. Third it allows administrators to export full backups of the accounts for archives or retention.

This is walk through of how to import delete emails from a Google Apps account back into a users account.

The  Steps
1. Log into Backupify and select your user.
2. Click “Request a zip export”, when the window pops up choose “Google Mail – users account name”

Backupify 02

3. When you receive the email from Backupify that the download is ready, click the link to download

Backupify 04 B

4. Download and install Thunderbird. Setup the users Google Apps account.

5. In Thunderbird, go to Tools > Add-ons

Backupify 06

6. Search for “ImportExportTools”, click install, restart Thunderbird.

Backupify 07

7.In Thunderbird, go to Tools > ImportExportTools > Import mbox file

Backupify 08

8. Select “Import directly one or more mbox files”

Backupify 09

9. Browser to the Backupify download of your user, select the mail box you need to import. In my case, I need the users sent mail that he deleted.

Backupify 10

10. You should see the mailbox added in the left side bar under Local Folders.
11. Select the emails you need to restore and drag them from the archive into the correct folder in your Google Apps account.

Backupify 12 B

12. Waiting for all changes to sync, verify mail has been restored in Google Web interface, then open your desktop client and confirm.

How To Add Colors To Mac Terminal

As I spend more time in Terminal I find myself wishing it wasn’t so boring. luckily there is a way to add some color to that painfully dull screen.

Let’s create a .bash_profile by opening terminal and typing:

vim .bash_profile

This opens up the built in vim editor. Hit the “i’ key to inset text and type this:

# This command tells termical to add color
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

# This command changes the terminal login colors
PS1=’\[\e[0;33m\]\h:\W \u\$\[\e[m\] ‘

Screen Shot 2013-02-01 at 4.18.31 PM copy 2

Then hit the “esc” key, this exits “insert” mode so you don’t add any more text to the actual file. To save and close the file type:

:wq

open a new terminal window and type:

ls

you should see that two parts now have color. The user of the session is highlighted before the prompt, and the output from the ls command is colored.

TERM02

To be honest thought the colors aren’t the best choose so lets install a better terminal them. Head over to here and install the peppermint theme.

Open terminal, select preferences and set the default to peppermint and check the colors by typing:

ls

TERM03

This looks better but, type this:

ping google.com

TERM04

Pretty boring standard output. Now lets get some color in the ping command.

Head over to Homebrew and copy this command from under INSTALL Homebrew or just paste it from below:

ruby -e “$(curl -fsSkL raw.github.com/mxcl/homebrew/go)”

TERM06

you should start to see some crazy things happen, that’s normal.

After that’s done run this command:

brew install grc

More crazy text things happening. Next run this command if you already setup a .bash_profile.

echo ‘source “`brew –prefix grc`/etc/grc.bashrc”‘ >> ~/.bash_profile

now the moment of truth. Open a new window in terminal and run this command:

ping google.com

TERM07

you should now see a colorful display of beauty. From here it’s just a matter of playing around with the ANSI colors of the peppermint theme in terminal preferences until you get something that you just love to look at.

TERM08

Support Links:
http://noiseandheat.com/blog/2011/12/os-x-lion-terminal-colours
http://mxcl.github.com/homebrew
http://noahfrederick.com/blog/2011/lion-terminal-theme-peppermint/

Increase the amount of RAM CrashPlan PROe can use

I run Crashplan PROe at work on 13 clients, backing up in the LAN and across the WAN. Occasionally I run into this issues where I open the client app on a workstation and it hangs on the splash screen and then crashes. At first I would unload and reload the engine until It eventually seemed to take. Then I ran into the instructions on how to increase the amount of RAM that Crashplan has action to. This seems to be especially important in my case because I’m running Crashplan on very old hardware. My Master and Storage servers are on PowerPC G5 Mac, stuck in time on 10.5.8. Even Crashplan has advised me to move to newer hardware as they are dropping support and I am currently maxed out as far as my Crashplan versions.

Editing the CrashPlan engine’s com.crashplan.engine.plist file allows java to use more memory. This seems to be more important for especially large file selections. Open the Terminal and follow these instructions

1. Stop the backup engine by typing this into the Terminal application:

sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist

2. Run this command to edit the backup engine:

sudo nano /Library/LaunchDaemons/com.crashplan.engine.plist

3. Find this line: Xmx512m

4.Edit that line to something larger such as 640, 768, 896, or 1024. I went with 1024: Xmx1024m

This sets the maximum amount of memory that CrashPlan can use. CrashPlan will not use that much until it needs it.

5. Hold the Control key and tap the x key to exit. Choose “y” to confirm it.

6. You’ll see the prompt “File Name to Write.” Hit enter to save to the existing location.

7. Re-start the backup engine by typing:

sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist

You should know it works if you’re able to open the client app and the consistent crashing stops and normal backups resume.