|
|
Create bootable clones via the command line
Actually, it is not required to remove ANY of those items for a successful clone with asr. A perfect, working clone with asr can be done using only:
sudo asr -source / -target /Volumes/[disk name] -erase That's it. This assumes you're booted from the device you wish to clone, and that you would like to erase the target before cloning. Replace [disk name] with the name of your target volume; it will need to be in quotes if it contains a space. See man asr for more information. So, what if you want to do this frequently, but don't want to wait for asr to clone a 250GB hard disk? Another good companion to this is a technique that will give you a perfect, bootable clone via synchronization, using RsyncX. RsyncX contains a special version of rsync that is aware of Mac resource forks and HFS+. You can download RsyncX here. RsyncX installs its special rsync at /usr/local/bin/rsync. To make a perfect clone of the boot drive to another drive, only copying things that have changed instead of the whole drive, the following command can be used: sudo /usr/local/bin/rsync -a --delete --eahfs --exclude="/dev*" --exclude="/private/tmp*" --exclude="/Network*" --exclude="/Volumes*" --exclude="/private/var/run*" --exclude="/afs*" --exclude="/automount*" "/." "/Volumes/[disk name]/" This can also be used in a cron tab, such as /etc/daily, for example. Add -v for verbose, --showtogo to show a percentage and number of files remaining, or --dry-run to see a "dry run" of what rsync would do, without actually changing anything.
Create bootable clones via the command line
Actually, it is not required to remove ANY of those items for a successful clone with asr. A perfect, working clone with asr can be done using only: sudo asr -source / -target /Volumes/[disk name] -eraseActually, since the asr man page itself specifically calls out that you should clean up the source volume before cloning (remove BootCache.playlist, volinfo.database, etc.), as well as booting from a different volume, I'd say those provisions are kinda necessary. By no means will you have a "perfect" clone, if you don't follow all the guidelines. Trust me: If you're trying to create a reliable source image, you want to be as careful as possible. While some things "look like they work" if you take a lazy approach to mastering that original image, many many problems can creep in afterwards, if you aren't very careful. Overall: Follow ALL the guidelines given in the man page for asr, and you'll have a much more reliable source image.
Create bootable clones via the command line
No, that's only if you're using asr to build a distribution image; most of the removals are recommended but not necessary, by any means, and the desired removals only apply when the image is to be used on entirely different hardware than that on which the image was created, and to work around problems that occurred in earlier versions of Mac OS X.
Create bootable clones via the command line
So, if I backup my HD using dave's shorter plan, then change my hardware, I risk not being able to restore from my backup?
Create bootable clones via the command line
No, I have used that exact method hundreds of times on everything from laptops to Xserves to Power Mac G3, G4, and G5 and everything in between, and have NEVER had any issue or anomaly. That's exactly how it's supposed to work, and is perfectly in accordance with the documentation (see my previous post). |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|