Answer the question
In order to leave comments, you need to log in
How to create an installable OS image, and what are the ways to clone servers?
There is a virtual server with Arch Linux installed and configured. Is
it possible to somehow create (or rather, be able to create when necessary) .iso image from which you can quickly deploy this system?
Or what other easy ways are there to clone a server?
I need this in order to be able to fork the staging server from the main one, when it comes time to update / install new software / do anything, and the hoster, despite all its charms, does not support the ability to make manual backups and restore instances from them, or clone existing ones. And somehow I don’t want to pay for the second server all the time.
It is interesting, in fact, how this is done in normal people, and whether my assumptions about how this can be done are feasible.
UPD: It turned out that this can still be done using the hoster's tools. But thanks everyone for the replies! It will be interesting to read about some things.
Answer the question
In order to leave comments, you need to log in
I have written a script for this, it clones a running system "on the fly" to another connected physical disk or to a virtual image file (vdi, vmdk, qcow2). There are script options that allow you to encrypt the entire disk of the clone. This is necessary when I clone the system to a laptop, for example, and there is a chance of losing a laptop. Or I run a cloned system on foreign virtualization servers.
The following utilities are involved in the script:
1. parted to partition the clone disk
2. cryptsetup to encrypt
3. lvm - makes life easier
4. rsync to copy files
5. chroot to do steps 6 and 7 on the cloned system
6. grub-install, update -grub 7.update
-initramfs
Well, Akronis is dragging, I'm not sure that it will work adequately with VM, but nonetheless.
You can configure it to turn on according to a schedule, and give a backup to some kind of samba ball.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question