Daily Backup to Encrypted Disk Image

I’d like to modify the export>daily backup script so that the backup is sent to an encrypted disk image. If I change the path to match the image, the script makes a new folder with the encrypted disk image’s name in which it places the backup. If I change the path to path/name.dmg, the script returns an error. I couldn’t find anything on Apple’s website. Any help would be appreciated.



One thing you could do, and I know it’s a bit hacky, is to run a cronjob which mounts the disk image every night, a few minutes before DT does the backup. Then you can have DT backup into a regular directory (like /Volumes/SoundnfuryImage), and a few minutes later run another cronjob that will unmount the image.

Disk images can be mounted from the command line with the ‘hdiutil attach imagename.dmg’ command, but I’ll admit, the last time I tried doing that with a cronjob, it failed. Maybe you’ll have better luck.

Jay P.

Thanks. Actually, it wasn’t the problem of mounting the image (I just get the dock to mount it every time I log in), but I didn’t know the parent directory had to be /Volumes/. Thanks again.


You can technically make it mount anywhere you like, but if you just do a regular mount, it’ll mount into /Volumes. Same with any external HD you plug into your computer, and even your iPod.

Jay P.