#1
|
|||
|
|||
Shutdown forced by UPS
Hi,
The following seems a common scenario for may of us. I have a UPS that forces a shutdown when the current goes off and the UPS battery is low. How does SD behave in this case, if this happens while SD is making the backup? Is the backup copy left in an incomplete but safe (i.e., readable) state, or is the copy screwed up? I am making the backup to a single disk image in a networked NAS disk. What would be the best way to handle such case? cheers --e. |
#2
|
||||
|
||||
Well... it really depends on how the UPS software does the shutdown. If it's a clean shutdown, everything should be safe but incomplete. If it's a "bad" shutdown, nearly anything could happen.
__________________
--Dave Nanian |
#3
|
|||
|
|||
Quote:
It is a typical Mac built-in forced shutdown: it does not depend on the UPS software, but it is the built-in UPS management software of MacOSX Tiger. Since 10.4.9, Intel Macs (like mine) have a "shutdown -u" option (see man shutdown), that is actually used for UPS forced shutdowns (see the script /usr/libexec/upsshutdown). So, given the above info, can you comment whether SD will leave the remote disk image safe (i.e., readable although incomplete) after an UPS shutdown? cheers --e. |
#4
|
||||
|
||||
Give what that script does -- force a shutdown -- it's unlikely an image would be unmounted by Finder before power was removed (since it waits for a dirty close).
__________________
--Dave Nanian |
#5
|
|||
|
|||
Quote:
cheers --e. |
#6
|
||||
|
||||
Well, I'd probably try to kill SDCopy and unmount the image, if any.
__________________
--Dave Nanian |
#7
|
|||
|
|||
kill -9 ? Or a nicer way to kill :-) ?
|
#8
|
||||
|
||||
I think a normal kill'll do it, no need to force. Try a SIGTERM or SIGQUIT.
__________________
--Dave Nanian |
#9
|
|||
|
|||
Quote:
Now, I guess that I should do the same for the fsck, and that at the end I could do a kill of the SuperDuper process itself (parent of both SDCopy and fsck). Or would it work if I kill directly just SuperDuper? cheers --e. |
#10
|
||||
|
||||
Well, the fsck is happening only during the mount (part of the OS), so the image wouldn't be mounted yet if that was running. I wouldn't kill SD! itself -- not really necessary.
__________________
--Dave Nanian |
#11
|
|||
|
|||
Thanks.
So, now I have added the following to the upsshutdown script (before the shutdown): killall -TERM SDCopy hdiutil detach /Volumes/TheBackupDiskImage hdiutil detach /Volumes/TheRemoteDisk Ca you comment which is better between -TERM and -QUIT? |
#12
|
||||
|
||||
-TERM should be fine; they're not really better.
__________________
--Dave Nanian |
#13
|
|||
|
|||
Thanks for everything. You guys rock!
This is the final version of my addition to the upsshutdown script: killall -TERM SDCopy hdiutil detach /Volumes/TheBackupDiskImage umount /Volumes/TheRemoteDisk |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
When will the next scheduled backup be if copmuter was turned off? | macjonte | General | 26 | 02-20-2012 12:17 AM |
Restart Machine | ShosMeister | General | 8 | 08-04-2007 11:26 AM |
Shutdown option | brilor | General | 3 | 02-21-2006 12:18 PM |
How do you just shutdown Mac after backup | NeoHawkeye | General | 5 | 08-29-2005 07:25 PM |