#1
|
|||
|
|||
Shell script not executing before backup RESOLVED
Hi all,
I'm a newbie at scripting, so please bear with me. In trying to achieve unattended backups that mount the backup disk (which is a partition on another internal hard drive, the other partition on that drive is always mounted already) before SuperDuper runs, then unmounts the backup disk when the backup is complete, I found some examples of shell scripts to do that. My test run didn't work correctly, here is the log result for the error: Code:
| 12:20:20 PM | Info | SuperDuper!, 2.5 (84), path: /Volumes/HomeDrive/Applications/Utilities/SuperDuper!.app, Mac OS 10.5.6 build 9G55 (i386) | 12:20:20 PM | Info | Started on Thu, Jan 8, 2009 at 12:20 PM | 12:20:20 PM | Info | Source Volume: HomeDrive, mount: /Volumes/HomeDrive, device: /dev/disk3s2, media: ST31000333AS, interconnect: Internal SATA, file system: "Journaled HFS+", OS: N/A, capacity: 681.51 GB, used: 157.86 GB, directories: 53791, files: 317610, ejectable: NO, ACLs: Enabled | 12:20:20 PM | Info | Target Volume: HomeDriveBAK, mount: /Volumes/HomeDriveBAK, device: /dev/disk2s3, media: ST31000340AS, interconnect: Internal SATA, file system: "Journaled HFS+", OS: N/A, capacity: 681.07 GB, used: 157.53 GB, directories: 53777, files: 317355, ejectable: NO, ACLs: Enabled | 12:20:20 PM | Info | Copy Mode : Smart Update | 12:20:20 PM | Info | Copy Script : Backup - all files.dset | 12:20:20 PM | Info | Transcript : BuildTranscript.plist | 12:20:21 PM | Info | PHASE: 1. Prepare to Copy Files | 12:20:21 PM | Info | ...ACTION: Preparing HomeDrive | 12:20:21 PM | Info | ......COMMAND => Verifying the integrity of volinfo.database | 12:20:21 PM | Info | volinfo.database OK | 12:20:21 PM | Info | ......COMMAND => Enabling permissions on HomeDrive | 12:20:21 PM | Info | Refreshing Disk Arbitration ... | 12:20:21 PM | Info | ......COMMAND => Verifying that permissions are enabled for HomeDrive | 12:20:21 PM | Info | Permissions on '/Volumes/HomeDrive' are enabled. | 12:20:21 PM | Info | ...ACTION: Preparing HomeDriveBAK | 12:20:21 PM | Info | ......COMMAND => Enabling permissions on HomeDriveBAK | 12:20:21 PM | Info | Refreshing Disk Arbitration ... | 12:20:21 PM | Info | ......COMMAND => Verifying that permissions are enabled for HomeDriveBAK | 12:20:21 PM | Info | Permissions on '/Volumes/HomeDriveBAK' are enabled. | 12:20:21 PM | Info | ......COMMAND => Verifying that HomeDriveBAK ACL support matches HomeDrive | 12:20:21 PM | Info | ...ACTION: Preserving Spotlight state on HomeDriveBAK | 12:20:21 PM | Info | ......COMMAND => Disabling Spotlight search indexing on HomeDriveBAK | 12:20:21 PM | Info | ...ACTION: Running shell script superduper_mountdisk.sh | 12:20:21 PM | Info | ......COMMAND => Invoking Before Copy shell script: /Volumes/HomeDrive/Users/gina/Library/Application Support/SuperDuper!/Shell Scripts/superduper_mountdisk.sh | 12:20:21 PM | Error | sh: /Volumes/HomeDrive/Users/gina/Library/Application Support/SuperDuper!/Shell Scripts/superduper_mountdisk.sh: Permission denied | 12:21:38 PM | Error | LOGGED EXCEPTION: FSGetVolumeInfo failed., reason: Unable to retrieve volume information, userInfo: (null) Code:
#!/bin/bash # mounts backup partition before running SuperDuper unattended backup BDISK=`/usr/sbin/diskutil list | awk '$3=="HomeDriveBAK" {print $6}'` /usr/sbin/diskutil mount $BDISK > /dev/null Thanks! Last edited by gfesmire; 01-08-2009 at 08:34 PM. Reason: [added "Resolved" to subject] |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turn off TM and User Backup services with a shell script | ronmtec@mac.com | General | 0 | 07-22-2008 02:05 PM |
Shell Script before Backup: time limit ? | Harry Cover | General | 27 | 05-07-2008 10:29 AM |
Server drive won't mount after backup | rhennosy | General | 1 | 11-09-2007 03:49 PM |
Unmount USB drive via Shell Script after Backup? | supesguy | General | 0 | 11-06-2007 03:07 PM |
Smart Backup Error | bill s | General | 20 | 02-04-2005 09:46 AM |