Create sparsebundle for Time-Machine
19. März 2011To automatically create a sparsbundle file used for Time-Machine Backups on Network Attached Storages you can use the following script.
#!/bin/bash
NAME=“$(system_profiler | sed -ne \
’s/.*Computer Name: //p‘)_$(ifconfig en0 | awk \
‚$1==“ether“{gsub(„:“,““);print$NF}‘).sparsebundle“
echo „Creating $NAME…“
hdiutil create -size 100g -fs HFS+J -volname „Time-Machine Backup“ „$NAME“
echo „Done.“
THis is based on the hints provided in c’t magazine 12/2010 (p. 174)
More information on how to configure Time-Machine to backup to NAS you can find here or here.