"Image" backup of Linux

Hi everyone,

For long time I am missing image backup of Linux machines. Thinking, sorry, it might be silly question, just wanted to discuss it with you.

What is the reason not to be having image backups for Linux?

And what would happen if we use file backup for Linux and take backup of /dev/sda for example?

Cheers,

Alex

(sigh) Complex questions.
In a few words, urbackup has no image support for Linux clients because you donā€™t need it. At all.
Due to Linux unix-like nature which means ā€œeverything is a fileā€ approach and variety and lots of filesystems and storage techniques (I meant such things like LVM/DRBD/Else) it is not easy provide simple enouth solution in your monolithic backup tool. But it is simple just to copy your files and set permitions on it. Everything you need is FILE! KISS principle in its best.
One more importaint thing:

Unix systems by and large avoid mandatory locks. There are a few cases where the kernel will lock a file against modifications by user programs, but not if itā€™s merely being written by another program. No unix system will lock a file because a program is writing to it.

(taken from StackExchange topic, thanks to Gilles)
So, it gives you an opportunity to backup almost everything, even database files with just cp command (if you donā€™t care about its consistency :sunglasses:, but itā€™s another large theme, donā€™t punch me hard, I know about snapshots and ā€œquiesceā€)

What is general purpose of image backup? IMO, answer is ā€œto provide disaster recovery solutionā€ when ā€œnothing worksā€ and your hardware or system is damaged badly.
Itā€™s not so hard to boot from media or network, simply re-create existed partition scheme, make filesystems on partitions/logical volumes, install and configure boot loader and simply recover all files from your file archieve. Fair enough? Yes.

And such open-source solution exists! Relax-and-Recover. Itā€™s simple, written in bash.
Also, if you have several Linux workstations or servers you can centralize ReaR by DRLM.

So, I think there is no need to integrate something like Partclone or Fsarchiver with snapshot support into urbackup.
IMO, the best way is to integrate ReaR and UrBackup and get ā€œbetter then imageā€ backup solution for Linux in UrBackup. I had a conversation about such integration with @uroni . He told me that it is possible to implement it in version 1.5. I think I can help him if Iā€™ll have much time for it.

And what do you think?

3 Likes

Many thanks for the complete and fast answer, first of all. :smile:

Well, that is pretty much correct that it is all file in the world of TUX. I truly agree the purpose of the backup is recovery back to business in the most fastest way. With respect to that, image archiving would be just a much faster way to restore. True, as well, is your pointā€¦ installing a new machine (matter of seconds if from template) and literally just ā€˜pasteā€™ from the backup could even be faster. Perhaps, just the image would save a lot of manual work like install packets when specific configuration etc. if not on hurry, so it would be nice having it.

Many thanks again and pretty best regards.

Alex

I think you should be able to backup /dev/sda as file. It can handle (nearly) arbitrarily large files and if you select ā€œfile differences - hashedā€ and store the backups on btrfs incremental backups only differences are stored on incremental backups.

It does not backup only used data on the drive and there is no changed block tracking.

As kot1grun has said, you need to provide a consistent snapshot (e.g. via LVM) of the disk or unmount them.

@kot1grun
I know I am a ā€œlittle bitā€ behind schedule on this but the necessary changes to support integration into ReaR are in the final stages now.

2 Likes

So I found https://github.com/datto/dattobd which would allow consistent image backups on Linux with changed block tracking. This can be used to create snapshots of ext4 and xfs file systems for file-based backups without LVM as well.

I might add support for this in a future version.

2 Likes

Image backup on Linux would be a great improvement.

Any plans?