Server not responding or not booting: how to fix it without losing data
Start by seeing what the server shows on its console before doing anything, because the message decides the fix. Try a clean shutdown before cutting power, and back up before any big repair.
Last updated:
Step 1: look at the server's state and console
See in the panel whether the server is running, then open its console. If the console shows a login prompt the system is fine and the problem is the network or a service, so see the SSH guide or the website guide.
Step 2: restart the right way
Try a clean shutdown first, since it closes programs and saves data. Use power off or a forced restart only if the server does not respond, because unsaved data can be lost.
Step 3: what the console message means
Emergency mode: usually a bad line in /etc/fstab or a detached disk. Enter the password, edit the file, add the nofail option to extra disks, and restart.
Kernel panic or grub rescue: the kernel or boot loader is damaged. Boot the rescue system to repair it or copy your files out.
A black screen or "No bootable device": check the boot order and make sure no ISO in the virtual drive is booting instead of the disk.
Read-only file system or disk errors: check the file system from the rescue system, not from the running system.
$ lsblk $ fsck -y /dev/vda1
Step 4: save your data before a big repair
From the rescue system you can copy files to another machine. If you have an earlier snapshot, going back to it is usually faster, but it removes everything changed since.
$ mount /dev/vda1 /mnt $ rsync -a /mnt/var/www/ user@OTHER_SERVER:/backup/www/

