My Automator script to backup files to encrypted disk image

Hi there. I have a question regarding Automator and Encrypted disk images. I've put together a workflow that grabs files in my home folder. My home folder is utilizing FileVault. I'm grabbing things like my iphoto library, documents folder and such. On an external usb drive I've created an encrypted disk image about 100GB. My goal is for the automator action to "successfully" mount > copy > unmount the encrypted image.
As of right now, the script works, but gives an error at the end of the copy, not allowing a successful unmount of the dmg. Is there something I'm doing wrong? I browsed through all the files after copying and they are all there, the folder sizes match up 100%.
I guess I could just use a program that does this, but, I find it much easier clicking on a shortcut in my dock to run the script and go away for 10 - 15 mins.
If it would help to view the script, let me know and we'll work something out.
Thanks

The popup box says:
The action "Copy Finder Items" encountered an error. Check the action's properties and try running the workflow again.
And the Automator workflow log says:
Can't read directory contents: /Volumes/Backup
But as I said, clearly it works and reads/writes to the encrypted dmg because all the files are there. What I do is just select all the folders inside the drive first, and delete/empty the trash first before running the action. This is the second step once I know this is working. So that I don't have to manually delete them everytime before running the script.
So to answer your question, the drive is empty, and the dmg is empty, allowable for a maximum 100GB of storage.
I think it might be something to do with copying files to an encrypted disk image, but, I can't find any help anywhere on this.
Thanks

Similar Messages

  • Adding files to encrypted disk images

    Here's what I'd like to do:
    - Select a file or folder "foo" with Finder
    - Go to my AppleScript menu bar item and choose a script to do the following:
    1) Mount an encrypted disk image (I already have one made); the password is not in my keychain so I'll need to be prompted to enter it
    2) Copy "foo" to the top level of the mounted disk image
    3) Unmount the disk image
    4) Move the original file to the trash
    5) Secure empty the trash
    I don't speak AppleScript very well; can anyone help?

    Thanks, Niel. You are always so helpful.
    I couldn't get it to work, though. The disk image wouldn't mount with the "open file" command. So I changed the first line to:
    do shell script "hdiutil mount ~/Documents/Miscellaneous/files.sparsebundle"
    That works; it prompts me for the image password and then mounts the image. So far so good.
    But then it stops with this error message:
    Can’t make {} into type alias.
    Do you know how to fix it?

  • Corrupted files within encrypted disk images

    Greetings Apple Hivemind:
    I've run across a repeatable problem when using encrypted disk images from Disk Utility.  Essentially, I'll create an image using settings like are shown below:
    The disk image is then used for storing data.  In my case, this is usually data for Adobe Lightroom.
    At first, this worked very well, and I housed the disk images on my household NAS, connecting via samba (smb) to it on my Mac.  Over time, however, something odd started happening:  Files on those encrypted images began getting corrupted whenever I tried writing new data to them.
    My first incident was where Lightroom informed me that the catalog it was trying to open was corrupted.  I  tried to create a new one on the same encrypted volume, and it too was instantly flagged as corrupted.  I opened the individual image files on the volume with no problem, so I wasn't thinking that the volume was the culprit.  That is, until I tried dragging new image files to it manually.  The new files were immediately either completely unreadable, or a mish-mash of the content of random OTHER files on the volume!
    The result was that all old data seemed intact, but I could no longer write new data to the volumes without major data corruption issues.  I thought that this was isolated to one volume in particular, but it soon started happening on ALL of my encrypted volumes eventually.  Including those which were not, and never had been, housed on my NAS, but were on my local hard drives.
    I've since "evacuated" all my data from these images, since the ones created by Disk Utility appear to be useless, and am seeking an alternative.
    Is this something that anyone else has encountered when using encrypted disk images?  It seems like this is something I should really open a support ticket for, but I can't say I've ever tried it, so I don't know how successful it would be to do so.

    bbonn wrote:
    I should add that I've tried using the "Repair" and "Verify" functions of Disk Utility on the volumes, and despite the obvious issues that exist in them, the utility doesn't find (or fix) any inconsistencies.
    Are you repairing/verifying the actual disk images, or just the partition they're on?  If the partition, it won't look inside them.
    Drag one to Disk Utility's sidebar, select it, then use Verify or Repair.  Note: the usual messages may not appear on the DU window.  Click the Log icon in the toolbar or select Window > Show Log from the menubar to see them.

  • How to backup a mounted & encrypted disk image?

    I have read all the posts about creating a sparse bundles. I guess this allows you to backup the disk image as long as it is not mounted? Will it still backup if it is mounted? Will it be usable when I restore it?
    What if all I want to do is just backup the mounted disk and not the image? I did some tests and it seems to work. When I look at the backup on a different machine by taking over the disk, I see the volume as a possible restore and I see the files. Am I missing something? I thought I had read that this does not work? I do realize that the backup is not very secure since I can now restore files on an image I had intended to maintain secure. It would be nice if time machine allowed me to backup in an encrypted format the required some password for the restore. Create sparse bundle on that backup disk and backup to that mounted image?
    Steven

    Well since it is encrypted, no matter how you delete it, it should remain secure. That is an advantage of an encrypted file
    However, if you want to over write the contents of the file, you can just drag it to the trash and select secure empty trash.
    NOTE: if you have a lot of other deleted files in the trash, it is going to take longer to do the secure empty trash as those other files are also going to be securely erased. I've made the mistake of doing the secure empty trash with several hundred files in the trash, some of which were rather large files.

  • Encrypted Disk Image on TC?

    Can anyone check for me whether Time Machine will backup to an encrypted disk image on Time Capsule?

    The Time Capsule doesn't show up one the left side of the screen in disk utility. When you click the "new image" icon on the top of the screen in disk utility a menu pops up, there should be a down arrow button next to the top line that says "save as", click that down arrow button. The middle part of the popup menu should expand. To the left on the expanded part your time capsule should be listed under "shared". Select your time capsule, and then click the arrow button again next to the "save as" line. Your time capsule should now be shown on the second line that says "Where". Now pick what you want to call the disk image and type it in the "save as box". In the other pull down lines you can pick how big and what format to make the image. Then click "create" and that should do it. Does that make sense to you?

  • Time Machine Backups of Encrypted Disk Images, Part 2

    Hi:
    If Time Machine is backing up a hard drive that contains a subset encrypted disk image as part of its contents, and this encrypted disk image is mounted (in an unencrypted state) where the enclosed data has been changed/manipulated in any fashion, what and when does Time Machine backup?
    In other words, does the data in the encrypted disk image only change when the encrypted disk image is unmounted? Or is it somehow backed up real time even when the encrypted disk image is mounted on the desktop in an unencrypted state while Time Machine is working?
    Sorry I can't explain this very well, but hopefully the gist is clear.
    Thanks!
    (OS 10.8.2)

    Time Machine doesn't back up a disk image file while it's mounted, whether encrypted or not.

  • Encrypted Disk Image and Backup

    If one uses Apple’s Disk Utility to create an encrypted disk image, what happens when SuperDuper, Time Machine, or any other backup utility is running while the (unencrypted) image is mounted on the desktop?
    Are both the encrypted image and the unencrypted data transferred to the backup device? Or is just the secure encrypted data copied to the destination?
    Nothing urgent on this, just curious. Thank you!

    I've played around with this a little. As best I can tell, when cloning an entire HD volume both CCC and SuperDuper will always copy an image file (.dmg, .sparsebundle, etc) that resides that on that HD, whether or not that file's disk image is mounted at the time. However the contents of the mounted disk image volume will not be copied separately, and so If the disk image is encrypted, no unencrypted content will get transferred this way. However as mentioned in the SuperDuper link above, it's better to unmount the image in any event, in order to ensure that the underlying .dmg or .sparsebundle file gets copied faithfully.
    If you want to copy the contents of a mounted disk image with CCC or SuperDuper, you can do so as a completely separate procedure from copying the HD. If you first mount the image (giving a password if it was encrypted), that mounted image will appear as an independent volume in the "source list" of CCC or SuperDuper, and you can choose that volume as a source for the copy procedure. You would need to designate a different target volume as well, so as not to overwrite your HD clone. If the disk image was encrypted and you deliberately copy its mounted image separately in this fashion, the resulting files on the target will not be encrypted.

  • Alias to open a file in an encrypted disk image

    Deleted.

    There is a quick and simple test, could someone with Lion installed be so kind as to do this:
    1. Use Disk Utility (or Knox if they own the app) to create an encrypted disk image on the Desktop called Test
    2. Mount the image, open TextEdit and paste a page of text into the window, then save the file in the mounted disk image
    3. Paste another page of text into the TextEdit window
    Open Terminal, navigate to /Volumes/Test, view the hidden files in the directory & post the results here.
    All you need to do to clean up is eject the disk image then drag the .sparsebundle file to the Trash.
    Cheers

  • How does one save new files to an encrypted disk image?

    I encrypted a particular folder, and used a sparse image to leave plenty of room, as well as using read/write permissions, but I don't see how to save new files to the encrypted folder.

    So, I guess you have to save the file to the desktop and then drag it to the mounted disk?
    No, you should be able to save directly to a mounted disk image via a dialogue box. There is no need for an intermediate step. As long as the encrypted disk image is mounted, it is open and appears to be just another folder.
    As an experiment, open a Textedit document and save it to the mounted (open) disk image via Save As in Textedit. It should be able to do that.

  • File Vault on HOme Directory with encrypted disk image in it

    I want to try File Vault. My question is as follows: I have an encrypted disk image already in my home folder. It is a small 500 MB one. Can I keep that in there, as is, without problems, or is File Vault going to encrypt and encrypted image and cause some sort of problem?
    Has anyone done this without issues?
    I know the alternative is to unencrypt my current image and let File Vault handle the encryption, but I am curious about leaving it alone and trying File Vault.
    Thanks for any help,
    x-.-x

    x-.-x wrote:
    I want to try File Vault.
    Good luck!
    File Vault going to encrypt and encrypted image and cause some sort of problem?
    FileVault is no more likely to scramble an encrypted disk image than it is to scramble the rest of your files. However, it is quite likely that it will scramble all of your files.
    Has anyone done this without issues?
    I have read many postings here in the discussion forums by people who have used FileVault and lost all of their data. Your mileage may vary. The only way I would use FileVault would be if I had an unencrypted copy of everything somewhere safe. Like you, I keep a small encrypted disk image for particularly sensitive files.

  • Create encrypted disk image with OS install disk utility.

    I thought to make a full backup of Macintosh HD, and followed instructions in /kb/ht1553.  However, every time I tried to creae an encrypted disk image, it barfed with "Failed - User interaction required". I assume it needed the encryption password, but for some reason was unable to display a prompt for this. Anyone know how to fix this?  Thanks, Stephen.

    Create an encrypted sparse disk image instead of from folder, mount it, and then drag & drop your files into ii.

  • Creating an Encrypted Disk Image on an External (USB) Drive

    I have an external 600 GB drive (2x 300 GB SATA 3.5" disks in a Thecus N2050 RAID0 external enclosure connected to iMac by USB2) onto which I would like to backup a large amount of data (500 GB).
    I store this external drive away from my home (in the office) and since I cannot guarantee physically locking away the drive I would like to logically lock the drive by placing all the backup data into an encrypted disk image created on that volume.
    I have tried creating an encrypted disk image on my USB volume in Disk Utility (Apple's instructions here) but I experience a number of issues not documented in the Apple article:
    1) I am not presented with a drop-down option for the size of the disk image.
    2) When I go ahead and try to creat the image I am told that the creation was impossible "file or folder does not exist".
    Is it possible to create disk images on USB volumes (I cannot create such a large disk image on my iMac HDD as I do not have sufficient space).
    thanks in advance
    Raf

    I realised that in Disk Utility you must not have any of your mounted drives highlighted in the left hand pane.

  • Encrypted Disk Image creation slow?

    I just got a new MBP with Leopard. I have created a number of encrypted disk images in the past using Tiger and a MBP and have not had any trouble. This weekend I tried a few times to create a 50 gig encrypted disk image (128 AES) on an external drive and after going through the process of setting it up and waiting for it to be created, (and watching the progress bar as it was being created), after about 45 minutes NO progress was showing on the progress bar. I ended up having to cancel the creation a few times because I thought something was going wrong. I’m not sure if there is a problem creating the disk image, or leopard is slow, or what.
    Does anyone know how long, on average, it would take to create an encrypted disk image of this size using leopard? I just want to know if there is a problem doing this on my MBP. Thanks for the help.

    A regular 50 GB disk image takes 50GB of space, no matter if it is full of files or empty.
    A 50 GB sparse disk image only takes up the amount of space equivalent to that of its enclosed files. So if the 50GB sparse image only has 1 GB of files inside, the image won't be much bigger than 1GB.
    A sparse bundle is similar to a sparse image, but instead of a single file it is a folder package with many, many enclosed files called bands. A new file added to the sparse bundle will tend to modify only a few bands. This makes incremental backups of a sparse bundle more efficient because only the changed bands need to be backed up again. Any change to a sparse or regular disk image will mean that the entire image will need to be backed up again.
    If you regularly add/remove files to a disk image, and you intend to back up that disk image with Time Machine, a sparse bundle is definitely the way to go. The other types will fill up your TM volume very quickly.

  • Encrypted disk image creation very slow-

    I just got a new MBP with Leopard. I have created a number of encrypted disk images in the past using Tiger and a MBP and have not had any trouble. This weekend I tried a few times to create a 50 gig encrypted disk image (128 AES) on an external drive and after going through the process of setting it up and waiting for it to be created, (and watching the progress bar as it was being created), after about 45 minutes NO progress was showing on the progress bar. I ended up having to cancel the creation a few times because I thought something was going wrong. I’m not sure if there is a problem creating the disk image, or leopard is slow, or what.
    Does anyone know how long, on average, it would take to create an encrypted disk image of this size using leopard? I just want to know if there is a problem doing this on my MBP. Thanks for the help.

    A regular 50 GB disk image takes 50GB of space, no matter if it is full of files or empty.
    A 50 GB sparse disk image only takes up the amount of space equivalent to that of its enclosed files. So if the 50GB sparse image only has 1 GB of files inside, the image won't be much bigger than 1GB.
    A sparse bundle is similar to a sparse image, but instead of a single file it is a folder package with many, many enclosed files called bands. A new file added to the sparse bundle will tend to modify only a few bands. This makes incremental backups of a sparse bundle more efficient because only the changed bands need to be backed up again. Any change to a sparse or regular disk image will mean that the entire image will need to be backed up again.
    If you regularly add/remove files to a disk image, and you intend to back up that disk image with Time Machine, a sparse bundle is definitely the way to go. The other types will fill up your TM volume very quickly.

  • Cannot see encrypted disk image in ML

    I created an encrypted disk image (password protected folder) through Disk Utility in Snow Leopard. However, now that I have upgraded to Mountain Lion, that folder appears to have vanished or is invisible. All my other file are intact but I just cannot see this encrypted folder anymore.
    Anyone else having the same experience or able to offer some pointers?
    Thanks,
    Peter

    There would be no reason for Mountain Lion to hide it. That's not normal behavior. Mountain Lion follows the same rules in this regard that Snow Leopard did. But, you can certainly check to see if it has somehow become accidentally hidden by entering the following command into the Terminal (but don't press return yet):
    ls -al
    Make sure there's a space at the end, and then drag the folder in which the .dmg file used to reside onto the Terminal window. This will enter the path to that folder in the command. Now switch back to the Terminal and press return. Do you see the .dmg file in the listing? If so, copy and paste the Terminal output into a message here, and I can give you a command that will show that file again.
    If it's not there, it must have been accidentally deleted. (Again, not normal behavior, so most likely either it was accidentally deleted by you or someone else who uses that machine or the hard drive is badly corrupt and files are going missing.) Do you have a backup of that file?

Maybe you are looking for