• What is your preferred solution to backup your Linux system?


    Hello everybody!

    Being new to Linux, I have been searching for a free, open-source backup solution for my Linux system and I could not find one that suits me. I am searching for something that saves compressed backups of disk partitions and boots from a CD or usb-stick in case of recovery need. Something like Acronis True Image, which I know from Windows, where partition images can be recovered or mounted to recover separate files.

    Any suggestions?

  • I would recommend ZFS!
    It supports compression, snapshots, deduplication and other nice features.
    With zfs send and zfs recieve its mostly like macOS time machine!

    Its worth to have a closer look at it :)

    The drawback is, that it is not officially suppported by Linux cause of some GPL license issues. So you ought to use LTS kernel.

  • @new2antrgs I was looking for the same thing after using SteamOS with a clonezilla setup and what I have discovered is that clonezilla uses partclone which is a Linux CL program and it does the job so perfectly on it’s own… so:

    I have a 2nd hard disk with Antergos on that boots to console (by disabling lightdm) and I can boot to this disk from the grub menu on my main SSD.

    Once booted (to console), I login and press up arrow to find the bash script I use which runs partclone on the 3 partitions on my main system, and I do this after any kernel/systemd/graphics updates or once a week.

    This takes very little input and does exactly what I need, it’s so simple I’ve even taken partclones of the cloning disk on my main disk in case that goes wrong! NB. save the partclone images on a separate partition so that any partclone doesn’t also pick these up and make the image huge!

    There’s no reason this can’t be on the same disk, it’s just that I didn’t have much space and I had a spare old disk and I like the extra resilience.

    And you could run it from a USB if you installed an OS onto it and ran partclone from there (I decided my spare disk was faster).

  • @robgriff444
    Thank you for the detailed instructions, I’ll have a look at it!

  • @robgriff444 said in What is your preferred solution to backup your Linux system?:

    pkgget antergos-customcfg-0.1.57-1-any

    Small typo here, should be:

    pkgget antergos-customcfg
    

    More info about this at https://forum.antergos.com/topic/10138/setup-a-community-repository-for-antergos/23

    And after running sudo antergos-customcfg you don’t have to run grub-mkconfig, just reboot.

  • Thank you for all your feedback. After reading your feedback and doing further research, I think I have now a much clearer understanding of the Linux backup utilities landscape.

    I am not using the LTS kernel, so ZFS comes not in question.

    fsarchiver lists windows systems (ntfs) as experimental, so again was excluded.

    I will test partclone, which I am planing to run from the Antergos installation usb for backup (booting from the usb), as well as the dd-utility with compression, again run from the usb as it seems that both dd and partclone cannot backup live systems.

  • @new2antrgs You’re right partclone won’t do mounted partitions. Also note you will need to install partclone everytime as it isn’t on the liveISO and also mount the drive you want to save the images to.

    But if you create a bootable USB (using the Live ISO install with systemd-boot NOT grub2) then you can do what you want. Also, if you do this you may need to start cnchi twice - mine quit during drive prep but worked 2nd time.

    And beware that basic USB sticks are painfully slow! You will need a fast USB3 drive or writing / reading images could take hours. Just for reference my HDD does a 20GB partition in ~ 5 mins.

    BTW I remove the detailed instructions as it was complicated by using grub and I now use systemd-boot so the following should suffice:

    Stop DE from starting:

    sudo systemctl disable lightdm
    

    Run partclone on /boot and / (replace sda1/2 with your partitions):

    sudo partclone.fat -c -s /dev/sda1 -o ./sda1.pcl
    sudo partclone.ext4 -c -s /dev/sda2 -o ./sda2.pcl
    

    Restore partclone:

    sudo partclone.ext4 -r -s ./sda2.pcl -o /dev/sda2
    sudo partclone.fat -r -s ./sda1.pcl -o /dev/sda1
    
  • @robgriff444
    I know I have to install partclone every time on the liveISO but this should not be a problem because it is not so big (2MB installed size I see from https://www.archlinux.org/packages/community/x86_64/partclone/) - bigger packages cannot be installed on the liveISO for lack of space. I have the OS’s installed on a SSD and save the backup on internal HDD at a rate of about 130MB/sec.

    From what I read one can also mount partclone images - can you confirm this?

  • @new2antrgs I haven’t tried mounting so not sure. In my case I use tar for backing up heavily used files so I would only use a clone if it was an unfixable system problem or it was faster. Tar is pretty impressive and I don’t miss the all-in-one GUI backup solutions I used on Windows!

    BTW, if you use an installed OS USB (rather than the Live ISO), you can boot to the command line and use simple commands in a bash script to have it start at the press of a key and reboot at the end.

    eg:

    read -p "Press a key to continue . . ." -n1 -s
    
system143 backup14 preferred2 Posts 10Views 222
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.