1

I am trying to find the easiest and most elegant solution to keep two desktops running that are clones of each other. I have a machine running cobbler. Every once in a while a few delicate changes are made to it (New images, some setting changes). I would like there to be another machine that is constantly running on the same network, and that clones the other machine overnight every day (In case the primary one breaks). The OS is CentOS 6.3. My idea was to have a script that runs automatically that creates a backup of the main one using tar. Sends it to the clone using scp. And another script on the clone that daily installs that backup. But I believe there might be a better way to keep them in sync (that uses versioning to just keep track of the differences).

3

A widely used solution to this problem of how to maintain duplicate machines attacks the problem from a slightly different angle - use a provisioning tool such as Ansible ( or puppet / chef) to script the set up of one machine as required, then use the Ansible scripts to clone a second ( or third, or fourth...) machine as needed. Any change required for the setup is first tested on a staging machine, and then written into the Ansible script to be applied to the main machine, giving a so called 'immutable' infrastructure. Any data on the machine that is not described by the Ansible scripts is then backed up and restored as part of the provisioning process.

Your machine 'clone' then consists of a set of provisioning scripts plus backups, which should be easier to manage, and smaller in size than a direct clone.

With this setup, creating a duplicate machine is simply a case of running the scripts on a freshly cobbled OS and applying the backups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.