Our backup script mounts an USB hard drive, copies some files, then unmounts. So, since the drive is only in use during this period, I thought it would be good to power down the drive once the backup is complete. Is there a command to do this? If yes, would I need to manually power it back up again when I need to use it next time?
closed as off-topic by MDMarra, MikeyB, Scott Pack, mdpc, EEAA Dec 17 '13 at 6:41
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – MDMarra, MikeyB, Scott Pack, mdpc, EEAA
Use this script.
This script is designed to properly put an USB device into suspend mode that can then be unplugged safely. But the ultimate effect is what you want to achieve.
Find some discussion about the similar topic here.
I've never seen a USB hard drive that manages power anywhere other than a power switch or the cord itself.
If it were a NAS it may be possible to send commands to the underlying OS to shut it down (or suspend) and possibly send it WakeOnLan commands.