Make Efficient System Backup

Matej

New Member
Joined
Aug 28, 2020
Messages
5
Reaction score
2
Credits
53
Hi everyone

I want to make an efficient disk image that stores just my custom Linux instalation with OpenHab and other software, without empty disk space, so that can be installed on other PCs or restored as fast as possible.

I understand that ext4 scatters files over the disk, but probably there exists software that builds disk image or bootable backup compressed in tar.gz.

Any Ideas How to achieve the similar as I do with Acronis Disk Imager for windows which makes the backup image even smaller than disk occupied space.

But sadly I was unable to make that backup bootable. (May running grub-install on live media in PC that I am restoring solve that).


I usually make full partition images, which takes a lot of space that is not necessary and I also do file backups regularly.

Usually, my whole configured system has 6.5GB in Peppermint OS, but I end up storing 16 or 32GB disk images - wasteful and time-consuming.

But full-disk images are no good for storing and copying, they make too much overhead (by storing and copying empty space).

It is ok if I make small partition before Installation, but how to be sure it is not going to be too small?

SO how to make a disk image that has the size the same as the size of stored files or even smaller.

It would be great to achieve a principle similar to the RaspberryPi OS disk image which boots directly without installation and most importantly it is small.

The main thing is that I would prefer not to reinstall Linux and reconfigure things form file backups if the image can be done easily and space efficiently.

Thanks in advance.

Matej
 
Last edited:


It is ok if I make small partition before Installation, but how to be sure it is not going to be too small?

Check the size of your home directory and that should give you an idea of what size to make your backup.

Have a look at Clonezilla. You might find that it saves you a lot of time.


 
Thanks a lot, to both for your suggestions.:)

I will try them soon.

Matej
 
You're welcome.

There are plenty of You Tube videos on how to use Clonezilla.

Let us know how things go.
 
I've read about fsarchiver on another forum and it seems great as it can meet my requirements quite closely.

I will experiment with it and see how backup size and restore procedure suits me.
 
i've used it for example :

# fsarchiver savefs /run/media/andrew/2571A67D759608A8/efi_backup.fsa /dev/sda1

Here i did a test to save /dev/sda1 onto an Sd card ; the command savefs tells the command its saving , full path of file to be saved with .fsa suffix where its going, lastly what i'm backing up.

I tried it with usb sticks also. One glitch which i haven't got around to understanding is : whether when doing reverse maybe to a new hard drive is whether it will recreate the right file type and size or whether you need to do that first? be interested if anyone else has used it . the other element is with trying to make back up with the idea of re-creating it is with elements such as " symbolic links" rather than just a hard file


As far as i remember clonzilla will do it all and you get a working system wheres with fsarchiver it does file , you may not get a complete working system copy
 
Last edited:
with backups it depends on purpose one approach might be at least for slackware is that if your considering that a fresh install will be involved then maybe its just stuff in home you need and maybe config files such as those in /etc which holds (slackware) config files

/etc/httpd/httpd.conf
/etc/httpd/extra/virual-host.conf
/etc/slackpkg/mirrors

for that i found that rsync did the job
 
with backups it depends on purpose one approach might be at least for slackware is that if your considering that a fresh install will be involved then maybe its just stuff in home you need and maybe config files such as those in /etc which holds (slackware) config files

/etc/httpd/httpd.conf
/etc/httpd/extra/virual-host.conf
/etc/slackpkg/mirrors

for that, i found that rsync did the job

Awesome approach!!
That got me thinking " you may not get a complete working system copy "
I appreciate your answers.

As I am making a new install of Peppermint for OpenHab ...
I think I will create a new partition of about 8GB.
Then install Linux and OpeHhab.
Finally, I will make a full image of this partition, to have a reliable backup I know I can restore from.

After that, I will use Rsync and also set up an automatic file backup.

I am still wondering if there is a way to make a small backup that is reliable to restore in one step.

Matej
 
"I am still wondering if there is a way to make a small backup that is reliable to restore in one step."

The quickest way I think is to hook up an external device highlight the whole /home directory and tell it to copy to the device.
And, even that is 2 steps.
If there is a one step way of doing this I haven't found it yet.

I looked at Bacula and a few others on this page that seem pretty simple. If you want to take a look.
https://helpdeskgeek.com/linux-tips/5-ways-to-automate-a-file-backup-in-linux/

How did your backup go?
 
Backup went fine, I am getting used to making the right size partition at installation so that I get about 60% utilization.

Then I configure the system, make a partition image, and extend the partition at the end.

And that is not so wasteful regarding image size.


Bacula seems nice, also thanks for the link.

Actually these automated file backups are the closest to one-step restore of needed files.
 
G
Backup went fine, I am getting used to making the right size partition at installation so that I get about 60% utilization.

Then I configure the system, make a partition image, and extend the partition at the end.

And that is not so wasteful regarding image size.


Bacula seems nice, also thanks for the link.

Actually these automated file backups are the closest to one-step restore of needed files.
Glad to hear the backup went well.
What program did you end up using to perform the backup?

You should be good to go now.
 

Members online


Top