What software to use for creating custom Linux image on ext4 filesystem
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What software to use for creating custom Linux image on ext4 filesystem
Hi, everyone.
I've been using linux for a year now, but creating small and reliable system backup seems imposible for now, may teere be the software that can make it posible.
I want to make a small disk image that stores just my custom Linux installation with OpenHab and other software, without empty disk space.
Usually, I did a full-size disk image but it seems wasteful to store empty space int an image.
Sometimes I did make smaller partitions, but what to do if partition is big already?
Usually, my system with installed software takes 6-8 GB.
I do file backups but in case of SD card or hard drive corruption, I would like to restore my preconfigured Linux as fast as possible, so my OpenHab connected devices remain accessible.
So I think the disk image is the best for emergency restoration(I like the simplicity and reliability of restoration).
But I don't know what software can achieve creating disk image without storing empty disk space.
I know that ext4 scatters files over the disk but I want the image at most the same size as files on the disk...
For example, Acronis Disk Imager does an amazing job creating a disk image smaller than the size of occupied disk space, sadly I was unable to make bootable media from that image(May I need to reinstall grub by live-boot on that media that I want to restore??)
Resizing partition that I want to backup seems dangerous so...
The software that I am searching for should grab the files and create one file that can be extracted to the disk when restore is needed.
To summarize I want to make a small disk image that can be restored without any fuss other than maybe expanding partition.
The OP stated they already do file backups.
For a full filesystem, as distinct from a full disk, backup I like fsarchiver. It creates a compressed, CRC checked single file point-in-time backup that can be simply restored in full. Not much use as a day to day backup, but great for a toss-in-the-drawer safety net.
Last edited by syg00; 08-31-2020 at 05:37 PM.
Reason: oops - wrong tool initially
As soon as I will get it working I will mark this Solved, is there a button to do so?
There should be text saying "Please Mark this thread as solved if you feel a solution has been provided." at the top of the page, where the bold text is a link.
Otherwise, look for the "Thread Tools" menu which will bring up a "Mark this thread as solved" option.
Usually one combines some compression with a backup. The type of compression may depend on your data and file size. Not sure why you are stuck with ext4 also.
Usually one combines some compression with a backup. The type of compression may depend on your data and file size. Not sure why you are stuck with ext4 also.
Regarding ext4, I already have one system on 120GB disk(only 10% utilized) with an ext4 filesystem. Keeping a 120GB image, in this case, seems nonsense.
I did a clean install of Peppermint onto a 10GB partition, that I am configuring for OH2. Then I will make an image of this 10GB partition with 70% utilization which doesn't seem so wasteful...
Than at restore I just extend partition.
.........
I did quite some research and people have issues with a bootability of that backup made with fsarchiver. As they needed to repair the grub bootloader and debug things when restoring. Which is no good for system backup, but it is useful for major data backups.
Are any other filesystems better at backup and restore, as you say why ext4...
For new systems I have a solution to image a small partition, but what to do when backing up systems like one mentioned with big empty partition?
The only tools I know that they optimize disk image size are Acronis and MAcriumReflect, the first one did the backup but couldn't restore completely to be bootable.
Anyone suscesfully restore linux with any of them?
A file by file method tends to leave the empty data untouched as opposed to a bit by bit copy. Clonezilla uses common programs that you can use alone or just use clonezilla. Many distro's have a backup in package manager.
Backup programs usually don't put file after file like a normal drive. They usually put them into a single file or collection of files (that contain many files).
I have used Acronis a long time ago and have used it for windows. I assume some other issue is going on. Both are well respected programs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.