I am trying to make a VM Image of my nethserver installation for Backup Purposes…
I did a dd if=/dev/sda of=/mnt/sda to create an image
and then
VBoxManage convertfromraw
to create a vhd file.
The problem is, when I use that in a Virtualbox machine it boots, but halts in an emergency console.
The problem is, that sda1 is sr0. So Virtualbox sees the harddisk as a cd-rom…
Looked on the web but can’t find anything.
I wonder how is Linux determining if a volume is a cd-rom or a hard disk???
Is there another way to convert a physical installation to a vm?
I need it because i am on vacation and if the server crashes I have a second computer on which i want to start the image as an emergency backup…
Your concern is to rise a new server when the first one will be down, so the first question you have to solve is : how to keep in sync all the data between the two servers and how replace the faulty server by the workable one as fast as possible
hotsync should be your key, but I have no experiences on it.
Other Idea
Use the internal backup system of NS, then restore the last backup when the server is down, the cons is it is long, it is not sure because the backup restoration must be tested from time to time
Some script based with rsync, you create the users with the same password on all server, but you mirror the data with a cron and rsync (quite all is in /var/lib/nethserver), technically you have just to change the IP
As I through the only problem is users problems acces their unavailable data, if an other nethserver with a backup is already right away to be fired up, the problem is solved.
.
other idea, virtualize your server and make snapshot of it, proxmox could help you, it works well. If something goes wrong you could go back at the last snapshot, but it is not a backup, you have to mirror your data elsewhere (ideally not in the same room of your server to avoid theft, flames and water)
I had exactly that solution proxmox saves via nfs etc… in a other client but with this one o have only a crap 2 core machine, they dont have ressources…
The best is to have as I had 2 proxmox not in cluster with vm backup on nas synology and recover in almost in few minutes… IT worked very well, and restore vm backup.lzo… So… No for this one unfortunatly…
Made a new installation of nethserver in a VM and did a Config restore and tried hotsync.
It doesn’t copy my AD or Sogo Config. So the original idea of making a dd image of the server and convert it to a vm is still good.
So I repeat my question: in the VM I don’t have sda1 but the system is on sr1 (CD-ROM). Any idea why the image changes device names or how I can convince the system that there is a sda1 instead of sr1???