I have an Ubuntu Server 20.04 machine running with a long-running memory-intensive data processing script running. I would like to replace my old hard drive with a new, larger hard drive.
Is it possible to hibernate the system, copy the old drive to the new, swap the drives, and then un-hibernate the system?
My plan would be
systemctl hibernate (first verifying
swapon --show returns a swap file), power off, unplug the old hard drive, copy (using CloneZilla) the old hard drive to the new hard drive on another machine (or maybe using a bootable USB OS on the same machine), plug in the new hard drive, and then power on the machine.
Will this work?