Use AppleScript to Restore Multiple Partitions through Disk Utility
Does anyone heard about the AppleScript? I am looking for one which I can use to restore several partitions from a master drive to a stack of external drives. If it is necessary I can partition those drives. Right now there are 16 partitions in the master driver and all of them of same size. I would like to run a script so that the Disk Utility can list restoring each partition to the matching 16 partitions on external drive. Does anyone know how to do this? How can I create script using AppleScript? I don’t have much knowledge with advanced AppleScript.
Re: Use AppleScript to Restore Multiple Partitions through Disk Utility
I don’t think that in Apple you will get like that technology. I have seen in UNIX like computer a utility called diskutil. I think that this is the one which you are looking for. First of all you need to know what you exactly want to do. Without knowing it, it is hard to find precise code. You can either use the applescript or a shell script. At this your boot drive will be disk0. If you set the mater drive as second drive, it will be disk1. If you attach another drive, that will be a slave drive and would be disk2. These things may not be default, you have to check it. Once the IDs are identified, you can partition the drive.
diskutil partitionDisk disk2 16 GPT [format name size]+
The last three parameters indicate the partition format. You should repeat them for each partition on the disk. You can specify the sizes in any manner.
Re: Use AppleScript to Restore Multiple Partitions through Disk Utility
Up to and including Mac OS X 10.4 operating system offered no way to partition a hard drive to change later without erasing all data. The only way was to copy all the data including the operating system to another disk, the computer to boot from a different volume and delete the hard drive completely or to repartition. To work with disk partitions, you had to inevitably pay third-party software such as iPartition draw. From Mac OS X 10.5, it is possible to use Disk Utility (Applications - Utilities) to change the partitioning of a hard drive later, without having to delete all data must be - albeit with some limitations.
Re: Use AppleScript to Restore Multiple Partitions through Disk Utility
TestDisk is OpenSource software that works fixing the serious problems of your disk. Tasks Performed:
- Fix partition table and recover a dropped table.
- Recover boot sector otherwise boot from the backup FAT32.
- Rebuild the boot sector in FAT12/FAT16/FAT32.
- Fix FAT tables.
- Rebuild NTFS boot sector.
- Recover NTFS boot sector backup.
- Fix MFT using MFT mirror.
- Recovers files from the FAT, NTFS and ext2.
- Copy files from deleted partitions FAT, NTFS and ext2/ext3.
- To recover data from a damaged disk or partition, you must run the program from another disk or partition to function appropriately. You must have a few prior experience in driving records.