Professional Documents
Culture Documents
/bin/bash
# A bash script to create a time machine disk image suitable for
# backups with OS X 10.6 (Snow Leopard)
# This script probably only works for me, so try it at your own peril!
# Use, distribute, and modify as you see fit but leave this header intact.
# (R) sunkid - September 5, 2009
usage ()
{
echo
echo
echo
echo
t"
echo
}
${errmsg}"\n"
"makeImage.sh"
"
usage: makeImage.sh size [directory]"
"
Create a disk image with a max storage size of <size> and copy i
"
<dict>
<key>com.apple.backupd.HostUUID</key>
<string>$UUID</string>
</dict>
</plist>
EOFPLIST)
echo $PLIST > "${NAME}.sparsebundle"/com.apple.TimeMachine.MachineID.plist
echo "done!"
if [ $# == 2 ]
then
echo -n "Copying ${NAME}.sparsebundle to $DIR ... "
cp -pfr "${NAME}.sparsebundle" $DIR/"${NAME}.sparsebundle"
echo "done"
fi
echo "Finished! Happy backups!"