[plug] Backup of linux computer to cloud VM that can be remoted into in the case of failure?

Install Gentoo-libre installgentoo at endianness.com
Mon Oct 24 18:41:59 AWST 2022


On Mon, 24 Oct 2022 17:51:00 +0800
Daniel <daniel at iinet.net.au> wrote:

> Hi
> Is it possible to setup a Backup of linux computer to cloud VM that
> can be remoted into in the case of failure?
> 
> How might this be done? 
> What file system setup and which cloud provider might work? 
> 
> Thank you 
> 
> Daniel 
> 
> 
> 
> 
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
> 
Hi Daniel,

I got nothing for the kernel, Linux, but I got two recommendations for GNU+Linux (will work on systemd+Linux as well).


For your requested setup, I'm guessing that you're referring to live complete system cloning.

It's possible to do, by shutting your computer down and then using qemu-img to create a VM bootable copy of / .

You then will be able to load that VM image up into a VM provider and have an identical system in the VM.

With a bit of configuration, you could then periodically make the VM sync with your main computer via a periodic crontab that does something similar to:
https://wiki.archlinux.org/title/Rsync#Full_system_backup

Note that there will be issues, as software don't like files being externally changed, plus any issues on the main system will soon propagate to the VM.

One thing that could be a blocker is different CPU flags on your computer and the VM - software compiled to work across all AMD64 CPU's will usually work,
but you'll run into issues if you use software compiled from source with nice flags like -march=native.


As for the VM provider and filesystem, any that accepts qemu images (like qcow2) will do and go for ext4 (as it's well supported and other filesystems don't
provide a worthwhile benefit).



Still, such setup doesn't make much sense, as you'll run into very confusing issues and keeping the VM working will be very time consuming.

A much better idea would be to run 2 completely separate systems in parallel, with data files synced with rsync, but no syncing of the software.

Kind Regards, Gentoo-libre


More information about the plug mailing list