How do I prevent a scheduled shell script containing an rsync command from causing a kernel panic?

Solution 1:

I notice you have VirtualBox kexts loaded. I assume you have a VM running during the backup. In the past few months I've had kernel panics (nowhere near consistent as yours), from varying apps, but I eventually realized they only happen if I have VMs running and a high CPU load (like rsync would create).

I have no idea why yet, but you could probably test that on your system.

Your rsync command looks OK. I second the comment that says you should use launchd rather than cron though. Cleaner, more reliable, and once you create the plist in the right place, you won't have to worry about accidentally running as root.

There's a nice app called Lingon that provides a GUI for launchd. Very nice to work with, even if you're comfortable editing plist files manually.

Also, make sure the shell you specify at the top of the script is the same as the shell you're using in Terminal. Doubtful that's it, but you never know.