Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
This chapter is from the book

Using File Archives and Disk Images

Archiving and backup are both synonymous with copying data to another location for safekeeping, yet in the context of this chapter, they are different processes serving different purposes. In Lion, archiving is typically a manual process that involves creating compressed copies of selected data. Archive formats are efficient from a storage and data transfer perspective, but they generally require user interaction. On the other hand, the backup service introduced with Mac OS X v10.5, Time Machine, is an automated process that allows users to easily browse the backup history of their entire file system. As you can imagine, maintaining a history of your file system is not space efficient, but it is extremely useful.

Understanding Archive versus Disk Image

At its essence, archiving is the practice of saving copies of important information to another location or format better suited for long-term storage or network transfer. Large amounts of hard disk drive storage have become much less expensive in the last few years, but this type of storage is still not as reliable as tape or optical media in terms of longevity. This type of archival media has not kept up with the tremendous growth of hard drives, so storing archival data in a more efficient form by compressing it is still relevant. Also, no matter how robust your Internet connection is, there never seems to be enough bandwidth, so compressing items in preparation for data transfer is almost always a time-saver. Lion includes two archival technologies, archives and disk images, that allow you to combine multiple files and compress the data into a more efficient file suited for long-term storage or network data transfer.

First, the Mac’s Finder will allow you to create zip archives from a selection of files or folders. This is an efficient method for archiving relatively small amounts of data quickly. The zip archive format is also widely compatible, as many operating systems include software to decompress zip archives back to their original items. However, zip archives in Lion do not offer the flexibility provided by disk images.

Disk images, created using Disk Utility, are more widely used in Lion for archival purposes because they offer many features not available from zip archives. Primarily, disk images allow you to archive the contents of an entire file system into a single file that can be compressed, encrypted, or both. Disk images can also be created as read/write so you can easily make changes to them over time. The only downside to disk images created using Disk Utility is that, by default, only Macs can access the content—other systems require third-party software to access Mac disk image content.

Creating Zip Archives

Lion’s Finder allows you to quickly create a compressed zip archive from any number of selected items. By default, creating a zip archive in the Finder will not delete the original items you’ve selected to compress.

To create a zip archive in the Finder:

  1. Select the items you wish to archive and compress in the Finder.

    You can hold down the Shift key to quickly select contiguous lists of items, or hold down the Command key to quickly select noncontiguous items. It’s best to put all of the items in one folder and then compress that, as opposed to selecting multiple items.

  2. Choose File > Compress “Items” from the menu bar.

    The word “Items” in the menu will be replaced by the name of a single item you have selected or the number of items you have selected.

    If the archival process is going to take more than a few seconds, the Finder will show a progress dialog with the estimated time required to complete the erase task. You can also choose to cancel the archive by clicking the small X button on the far right.

  3. When the archival process has completed, you will be left with a zip archive named either Archive.zip or Item.zip, where Item is the name of the single item you chose to archive and compress.
ch4-037.jpg

Once the archive process is complete, it’s always interesting to compare the original items’ size with the archive’s size using the Get Info or Inspector windows in the Finder. In many cases, you can expect at least a 50 percent decrease in file size. On the other hand, many media formats are already quite compressed in their original form, so you may not experience very good results when compressing these types of files.

ch4-038.jpg

Expanding Zip Archives

Expanding a zip archive in the Finder is as simple as double-clicking on the zip archive file. The Finder will decompress the entire archive file and place the resulting files and folders in the same folder as the original zip archive. The Finder cannot list or extract individual items from a zip archive. By default, the Finder will not delete the original zip archive.

Understanding Disk Images

Disk images are files that contain entire virtual drives and volumes. Lion relies on disk images for several core technologies, including software distribution, system imaging, NetBoot, Legacy FileVault, and network Time Machine backups. Disk images are also useful as a personal archive tool. Though Mac-created disk images work only on Mac computers by default, they are much more flexible to use than zip archives. Disk images provide advanced compression and encryption, but their greatest benefit is that they can be treated like a removable volume.

To access the contents of a disk image, you simply double-click on the disk image file in the Finder. This will mount the volume inside the disk image file as if you had just connected a normal storage device. Even if the disk image file is located on a remote file server, you can still mount it as if it were a local drive. You can treat the mounted disk image volume as you would any other storage device by navigating through its hierarchy and selecting files and folders as you need them. Further, if the disk image is read/write, you can add to the contents of the disk image by simply dragging items to the volume.

ch4-039.jpg

Using /Applications/Utilities/Disk Utility to make disk images allows you to create blank images, or images containing copies of selected folders or even entire file systems. Lion supports disk images up to 2 terabytes. Disk images also feature a number of configuration options, including:

  • Image format—Disk images can be read-only or read/write. They can also be a set size or expandable as a sparse disk image. Sparse disk images will take up only as much space as necessary and automatically grow as you add items to them.
  • Compression—Read-only disk images can be compressed to save space. With a compressed disk image, any free space becomes negligible in size, and most other files average a 50 percent reduction in size.
  • Encryption—Any disk image can be protected with a password and encrypted with strong 128-bit or 256-bit AES encryption. Choosing a higher bit rate is more secure but degrades performance. This feature is useful for securing data stored on otherwise unsecure volumes like removable drives and network shares. The encryption always happens on the local computer, so even if the disk image file is physically stored externally, as on a network file share, the data is always encrypted as it travels across the connection.
  • File system—Disk images can contain any partition scheme or volume format that Lion supports, including optical media formats. Details regarding the differences between file system options are covered in Chapter 3, “File Systems.”

Creating Empty Disk Images

To create an automatically resizing empty disk image that you can fill with content over time:

  1. Open /Applications/Utilities/Disk Utility, and then choose File > New > Blank Disk Image from the menu bar. Or with nothing selected in the drives list, you can click the New Image button in the toolbar.

    ch4-040.jpg
  2. Enter a name for the disk image file, and then select a destination for the disk image file from the Where pop-up menu. Also enter a name for the volume inside the disk image.

    The disk image file and volume names do not have to match but should be similar so that you can recognize their relationship.

    ch4-041.jpg
  3. Select a volume size from the Size pop-up menu, or select Custom to specify a disk image of arbitrary size.

    Remember, this disk image will occupy only as much space as the files you copy inside it. Obviously if you’re going to save it on an external volume of limited size, that should define your maximum size.

    ch4-042.jpg
  4. You can select a different volume format or partition scheme from the pop-up menus, but in most cases you will want to stick with the default Mac OS Extended (Journaled) and Apple Partition Map selections.
  5. You can also select an encryption at this point from the pop-up menu. For most uses, 128-bit AES is secure enough and still provides good performance.

    ch4-043.jpg
  6. Choose “sparse disk image” from the Image Format pop-up menu to create an automatically resizable disk image.

    ch4-044.jpg
  7. Click the Create button to create the disk image.
  8. If you have selected an encrypted disk image, you will be prompted to enter a password for the disk image. After you have selected a secure password, click the OK button to finish the disk image creation process.
ch4-045.jpg

After the system has created the new blank disk image, it will automatically mount it. From the Finder, you can open Get Info windows on both the disk image file and the disk image volume to verify that the volume size is much larger than the image size. As you copy files to the volume, the disk image file will grow accordingly.

ch4-046.jpg

Creating Disk Images from Items

To create a disk image that contains copies of selected items:

  1. Open /Applications/Utilities/Disk Utility.
  2. At this point you can choose to create a new disk image from the contents of a folder or the contents of a volume.

    To create a disk image from the contents of a folder, choose File > New > Disk Image from Folder from the menu bar, and then select the folder you wish to copy into a new disk image from the file browser window. Once you have made your selection, click the Image button to continue.

    ch4-047.jpg

    To create a disk image from the contents of an entire volume, use the same menu option, Disk Image from Folder, and then simply choose the volume. It may be tempting to choose Disk Image from (Select a Device), but this option will copy the empty space on the volume as well, making the resulting disk image artificially large. The only time you should create an image of a device is when creating images of optical media.

  3. Enter a name for the disk image file, and then choose a destination for the disk image file from the Where pop-up menu.

    Again, the disk image file and volume names do not have to match but should be similar so that you can recognize their relationship.

    ch4-048.jpg
  4. Choose an image format from the pop-up menu. Remember that compressed images are also read-only.

  5. You can also choose an encryption at this point from the pop-up menu.

    For most uses, 128-bit AES is secure enough and still provides good performance.

  6. Click the Save button to create the disk image.

If you have selected an encrypted disk image, you will be prompted to enter a password for the disk image. After you have selected a secure password, click the OK button to start the disk image creation process.

Depending on the amount of data that has to be copied and the image format you chose, it can take anywhere from minutes to hours for the disk image copy process to complete. Disk Utility will open a small progress dialog that will also allow you to cancel the disk image copy by clicking the Cancel button.

ch4-049.jpg
  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020