Greetings after so many mishaps with my server of my own fault I want to know is their actually a way that i can clone a hard drive in a live environment. And force it to ssh out to another server… Maybe DD commands or some things… What i was thinking is I could setup a shell script to run this every week allowing my server to be backed up live…
I use Clonezilla, but not live so I can’t help you there.
Regardless, my 2c;
The backup module works, for a given server I point mine at another share on another node, if you junk your server, you install fresh, install the backup module, point it to the backup node and restore.
What i might do tonight is once i get every thing as close as I like it create an clonezilla image backing it up to my other server… But thats not exactly a permanent solution… I figured maybe you could dd and copy like that live…
Maybe this might be a better backup idea for a live clone not sure…
#warning this has not been completely tested… sudo dd if=/dev/sda |ssh user@192.168.1.10 of=/home/loren/Desktop/backup/imgbackups/latest/nethserver.img
I’m confused, when you say live, I assume you mean with the server running, so are you trying to run dd while the server is running or are you booting the server with a clonezilla live cd?
When i mean live I mean that I am running the server live not clonezilla live cd…
The goal is to revert back to a clonezilla cd and just grab the image and slam it on the server if needed…
You realize there’s no such thing as in instantaneous snapshot of a hd?
How will you reconcile changes that occur during the time that passes while you’re reading through the file system?
Understand, dd will basically start at the beginning of the disk and read toward the end of the disk, the os will write wherever the hell it feels like it, too bad if it’s somewhere that dd has already read.
I would figure that during that time no traffic other than basic web and minecraft along with some teamspeak traffic would be occuring but for the most part that is all stored in their proper folders…
As far as server side configuration it should get things close…
so far the biggest issue during an installation of Nethserver is getting the system to understand what ip it is and the proper gateway…
Getting the system some what copied over would be a good thing and save about 14 hrs of work…
Before we released 6.8, I installed a server, setup several modules, (backup, ips, users, samba, owncloud, mail), loaded a bunch of files, let the backup run, destroyed the server, installed it again, got it on the lan, installed backup, pointed it to the share where the backups were, hit restore and off the top of my head, that was probably 90-120 minutes.
The reinstall and restore, probably about 45.
You cannot have confidence in your restore if your try to backup a live server, I would never do that in production, I’m not saying it can’t be done, but rsync and tar at least work with the operating system.
I guess i forgot about rsync Good thought i should look into that…
As far as backups… Yea i imagine tonight i will shut the thing done run clonezila live to back it up… Its kinda one of those things where we have to run a ton of specialized commands to get it to talk to the network and being that i am not actually sitting next to the server and its located in a datacenter up in Canada makes it a little more challenging to initialize the original startup web page… I have managed quite well with a vm of xubuntu but still not exactly ideal…
In short I really wish that the backup modules allowed for the use of a secondary hard disk to back files up to this way during re-installation i could just pull from the backup hard drive…
Not really a big fan of file share per say ie samba… but really like sftp if possible…
On a another note do you have any recommendations to pull all the sql files down to a folder ? my thought was i could write up a shell script to copy them over as well to the backup drive folder…
Just another way of thinking, because I love virtualization
What about two instances of Nethserver?
One is only hosting KVM. In the KVM your Nethserver is running. I don’t know KVM but Hyper-V and VMware have the possibility to do snapshots and this snapshots can be backuped. This would be a “live”-Backup like you want it.
Thats kinda what i was thinking I Might clone this drive and create another server instant on a separate ip… will still need to copy files but I think this might actually be a better option…
I will have to see what is needed to do this might take me a day or two…