The way I moved our entire #yunohost server from one bad drive to another was a lot easier than using the Yunohost backup and restore methods.
Our server has 2 drives. 1 x Nvme of 1TB (where we store Yunohost basically and boot from it), and 2x 4TB HDD merged into a single 8TB one, where we host the data for our Peertube and Nextcloud.
The Nvme was dying.
Solution? ddrescue!
Basically I booted into a rescue system (debian) via Hetzner's dashboard. Made sure the Nvme was unmounted. Mounted the 8TB HDD. And created an image file of the entire system of the bad Nvme to the 8TB HDD. Took around 2 hours.
Then asked the Hetzner team to replace the Nvme. Now again boot into recovery mode and simply restore the image to the new Nvme.
Worked like a charm! Restored everything...partitions, databases, driver's IDs....all!
4-5h to move it all. Sure more hours in total but the image creation and restoration was not long.
Rebooted and we are back!
It was much easier than to restore 10+ applications with huge databases.
So now our TROM.tf is back with our services....Nextcloud, Peertube, Friendica, and more....
I so recommend this approach if you are in a similar situation!
like this
TROM, veroandi_br and Andrew Pam like this.
Aethernal McAwesome
in reply to Tio • • •Is this ddrescue based on the famous dd command?
Tio
in reply to Aethernal McAwesome • •Now that I know about ddrescue and tested it I think in the future I would move servers with it since I think you should be able to create an image remotely via ssh to a new location.
The command I used to create the image:
ddrescue -f -n /dev/nvme0n1 /mnt/backup/yunohost-disk.img /mnt/backup/yunohost-disk.mapAnd to restore:
ddrescue -f -n /mnt/backup/yunohost-disk.img /dev/nvme0n1 /mnt/backup/restore.mapI think so.
Rokosun
in reply to Tio • • •> driver's IDs
I can't tell if you are joking or meant to say UUIDs here 😄
Tio
in reply to Rokosun • •