power cycle from command line...

  • Posted October 27, 2013

Hi, all.

I’ve just taken a snapshot of a droplet & was informed:

We recommend rebooting your droplet through the command line, as this action is the same as hard resetting the server and may cause data corruption.

I didn’t think it was possible to reboot a server from cold via the cli (unless you used ethtool).

Does anybody know the procedure for this? Any help appreciated.

Cheers, Phil…


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I had the same thought as Phil. I shutdown the droplet and took a snapshot. My mental model tells me that I should now need to boot the droplet. This is not true. It automatically restarted after the snapshot. It doesn’t help that the next thing we see is the “We recommend rebooting from the command line” message.

If you’re seeing that message, then the server is on. Above the ‘Power’ tab, you should see the server IP and status ‘Active.’

it doesn’t reboot automatically hence the message I first posted…

Would be useful if DO would link to the article how you can power down a Droplet from the command line. Seems to be sudo shutdown -hP now. I did and could no longer ssh into box. But I did not see status powered down from the DO Dashboard. Took a snapshot anyways. And then was told this can take up to an hour. Waited for about 5-10 minutes for it to be done. Basic Ubuntu 16.0.4 box running NGINX, PHP and MariaDB and one bare WordPress site. After snapshot was done I could immediately ssh into box. Not sure yet how I can verify the snapshot is functional or not.

You can just log into the control center UI and boot from there.

It’s supposed to (or, at least it has for me whenever I’ve taken a snapshot in the past). Perhaps you should open a support ticket.

Once the snapshot is taken, the system will automatically boot up your droplet, allowing you to SSH into it once again.

if the image is powered off, you can’t ssh into it to get a prompt in order to issue the reboot command, can you?

sudo shutdown -hP now, please ;-) I don’t know about KVM, but virtualbox won’t register a VM as off if it’s only halted, not powered off.

On Ubuntu, you can shutdown your droplet from the command line by executing <code>sudo shutdown -h now</code>; <br> <br>To reboot, <code>sudo reboot now</code>.

I think they just mean shutting your droplet down from the command line before taking the snapshot.