Thursday, August 3, 2017

Linux - Imaging backup solution?



I want to know is there a way to make a snapshot-like backup of a linux system into a single file and restore it in another system ?



You know in windows there are programs which makes a copy of a drive (like C:\ ) into a single image file. So you can restore this file later incase you are infected or something happens.




Every time I want to migrate my vps into another host, I have to setup the new server from scratch and move the files manually. Can I just make a snapshot backup of the whole system and restore it somewhere else (or on the same server) ?



I am not familiar with linux and I have no idea if this is technically possible or not ? Does the paritions, configs, system files,etc... are individual for each system ?



I heard about rsync, but that's not what I am looking for.


Answer



While snapshot style backups are possible in some situations, they will not be useful in this situation. The main reason for this is that VPS providers rarely give you low enough level access to their system for you to be able to restore data in this fashion.



The real answer here is to use a config management system to manage your servers. Puppet and Chef are two of the most popular configuration management systems at the moment. With systems line these, you specify in a set of text files how you'd like your server to be configured, what packages you want installed, etc. These configurations then can be applied to any server, regardless of its location.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...