Backup the whole Ubuntu machine

Hi
I’m new with this, so I need urgent help to get started.

I have set up an Ubuntu 20.04 server on a ThinkPad with static IP in my network
Installed Virtualmin.
Since I had to start from scratch (bad misconfiguration by setting up a restya install script)
I look for a solution to back up the whole machine to a connected USB Disk.

As I’m new I would prefer a simple solution to back up and be able to restore the machine in case of an accident.

Is there a function in Virtualmin to save the whole machine?

You want to:

  1. Make an image of a disk
    or
  2. Make an image of a partition

You could use the free and open source Clonezilla or Google phrases 1 and 2 for more options. Virtualmin can backup itself (i.e. Virtualmin own configuration) or the virtual servers (i.e. domains) that are hosted on a Virtualmin server but it does not have a function to save the whole machine.

There is only on HD in the ThinkPad
I want to make an image like in windows with e.g paragon to be able to restore the HD of the machine as it is at the time of the backup.
Which tool should I use?
Is it also possible to do this from a Windows 10 PC via network?

Connect a USB HDD / portable disk / USB disk (for use as destination of your image) to your ThinkPad and boot into Clonezilla from a CD.

Ah!
That’s the way!
But no cd drive
But I now understand the way.
I have a boot stick with Paragon free
will it be also able to back up the Linux HD?

I don’t know how Paragon handles Linux filesystems. I haven’t used it since I sold my tech support business about a decade ago. However, Clonezilla can be run from a bootable flash drive.

Also consider dd, partimage, Mondo Rescue, Bacula, or Redo Backup and Recovery. There are many paths to your goal.

Richard

OK so far
BUT!
I want to use the ThinkPad when it is configured as a server
Without keyboard mouse & screen like a VPS but @Home

How to do backups of the whole server HD via Putty console? to a connected USB HD

You can back up to any writable drive that the server recognizes and that has sufficient free space.

All of the methods I mentioned above have documentation that you can (and should) look over to decide which one is best for your mission. If I had to choose one for you, however, it probably would be Mondo Rescue because it can be used via the shell, can back up a live filesystem to pretty much anything, and has a guided interface (though not really a GUI) so you wouldn’t have to learn a bunch of command syntax.

As I said, however, there are many options. If you do the research, you may find something that suits your mission better. If you’re too busy to do that and just want a solution, then my suggestion would be to look into Mondo Rescue.

Richard

To backup the whole server while it is running via putty is not a good idea as the files will be constantly changing so much.
If I need to take a “snapshot” of one of my systems I use a simple script,

#!/bin/bash

tar --exclude='/backup.tgz' --exclude='/swapfile' --exclude='/sys' --exclude='/var/run' --exclude='/proc' -zcvf backup.tgz /

Put the above into a file such as ‘backup.sh’ and run it from /

As you can see it creates a file backup.tgz in / . It excludes swapfile, the backup, sys, var/run, proc … there may be other thing to exclude just add them as needed.

I use such a script every day, although rsync to another disk rather than tar. I have successfully used that disk as a replacement for the whole server before as well, though it took some grub wrangling and it was pretty much luck that the mysql db files worked correctly.

Other directories I leave out are: /run, /tmp, /var/lib/lxcfs (if you have it), /dev, and my favorite, /mnt – it’s where I mount the backup disk and sometimes other things; embarrassing to leave it out :slight_smile:

Oops, yes of course exclude /mnt if you’ve mounted a drive to send the backup to, otherwise I see it going round in ever increasing circles :flushed:

I’ve been researching Linux backup over the past couple months - frequently losing heart over the disappointing offerings. Whenever I see someone write about the wonderful cornucopia of backup tools, I sneer.

I’m in a different situation from you because I don’t have physical access to the server, so a usb drive or similar is not an option. If I were in your situation, with physical access to the server, I would consider Timeshift. It won’t work for me because it can’t back up to S3 et al, but it might work for you. It’s open source, relatively easy to use, stable, well-regarded and under active development.

I’m currently evaluating Syncovery, an interesting, powerful, reasonably-priced, commercial product. In your situation it might be overkill. The Linux version documentation seems light on, but the developer offers energetic support. So far, so good.

Virtualmin’s domain backup is a miracle and saved me when my Digital Ocean server died and their snapshots turned out to be unusable…I’d like to also use Virtualmin/Webmin for system backup, but, their tool of choice, Bacula, while allegedly powerful, doesn’t grab me - from the MySQL requirement on…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.