Arrg

I suspect that my Mac laptop’s hard disk is dying. When will it ever end. I got the laptop booted and I am in the process of running this little script I hacked up. It uses ssh and rsync to syncronise files between my mac and the linux file server. If you are not using sshkeys then you can remove the lines about ssh-add and ssh-agent. It backs up the Desktop, Documents, etc folders.

#!/bin/bash
eval `ssh-agent`
ssh-add /Users/ian/.ssh/sshkey
for folders in Desktop Documents Faxes HTTP Pictures Projectphotos Public bin photos p
roject src
do
echo “doing $a”
rsync -avr –rsh “ssh” –exclude “*.aiff” –exclude “iTunes” /Users/ian/$folders ian@linuxbox:/home/osx/backup
done
kill $SSH_AGENT_PID

Comments are closed.