Answer the question
In order to leave comments, you need to log in
How to backup a Linux server?
I describe the situation
There is a Linux router) I set it up for a very long time, there are a lot of interfaces, complex lartc policies, huge configs, a lot of software (proxies to different interfaces and routes, etc.).
I would like to back it up in such a way that if, for example, an SSD or motherboard dies in it, I could roll the entire system back very quickly.
I thought about virtualization, but I don’t want to fence such a garden specifically on this router. Although it may be necessary to throw the network into a virtual machine and keep it all that way.
Poconfig is also not interesting yet - reinstalling the OS and software and returning a bunch of configs to their places will take time.
Need a backup - how?
dd+gzip /dev/sda? Well, this is a little wrong, but if the new ssd is of a different size, will the partition table be broken? And isn't it too brutal?
stupidly boot with liv sd mount the root and backup it? and then put the bootloader?
and there is such that in two mouse clicks? like Acronis for Windows?
so that you can conveniently and without problems back up and roll out backups + boot sector so that it is in place?
Tell me specifically the best option (and why) from your point of view. what did you use? so that later for three hours not to figure out how to return the bootloader to its place.
Answer the question
In order to leave comments, you need to log in
An “adult” solution is a configuration management system, like Chef, Puppet, Ansible, etc. Considering that you don’t need to backup anything other than the actual configuration (the machine does not store data), this is almost an ideal solution.
Almost, because in some cases, downloading and writing a hundred gigabytes of bytes to disk can be faster than downloading and installing a hundred packages. Not to mention non-standard software that is not packaged.
Ideally, all the same, place it on a virtual machine,
As an example of building a system.
We make the system itself and scripts the required volume, 20-40GB storage.
We move the logs and the entire dynamic part of the system to a separate storage, ideally iSCSI.
Once a week or after major changes, we make a full backup of the container to a backup server with virtual machines.
In case of failure of the main one, we start this container on the reserve. This process can also be automated.
and if the new ssd is of a different size, will the partition table be broken? And isn't it too brutal?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question