Have ever tried penguins-eggs?

I may have missed something in this story

But

I thought backup and restore ideas were totally different to the idea of eggs…..

Backup copies your files as well, thought eggs just did the software and system

1 Like

I think it depends on how you do your disk partitioning.
If the home directory is on the root partition , it will be included with the system .
My view is that /home IS part of the system … because it is polluted with dot files. … I keep my data elsewhere so it is really separate.

1 Like

Hello Paul

I think there are two types of backup being considered in this thread

  • Only data (documents, source code)
  • OS state (installed programs + configurations) + data (documents, source code)

Therefore I think the latter fits well as a .iso file - same as a .vdi file if we talk in VB terms

1 Like

I am always cautious about copying the root filesystem of a running OS. You can do it, but I prefer to boot something else and copy the unmounted partition, the way clonezilla does.

If you use rsync ( or anything else) to move a Linux ( to another partition or to an ext formatted usb) it will not boot from the new location unless you edit /etc/fstab and change the UUID’s .
If dont edit fstab, and just copy it back to the original location, it will boot, because the UUID’s in fstab will be correct again for the original location.
If you copy it back, but not to the original location, it still will not boot… fstab will have to be edited.
I hope that is not confusing… it is a fact of life… every linux install is location specific because of fstab. There can also be issues with grub.cfg containing location specific information.
I think Clonezilla looks after this fstab issue… ie you can restore an image to a new location as long as it is big enough… ie at least as big as the original partition. I may be wrong there… never tested it?

3 Likes

Ok thanks for clearing that up.

I tend just to have one partition with everything just in directories or folders rather than have a seperate logical drive.

I do have this old document on how to put your linux on a bootable usb drive

My method does not make an iso… it makes the equivalent of an installed linux.

Not quite what you are asking.
A simple rsync and restore is easier than making a bootable usb.

3 Likes

Yes, I learn the hard way on moving files and not updating fstab. And even knowing that, I moved the swap file one time and Linux was taking a long time to boot. I believe it was the conflict of where the swap was vs what the UUID was in fstab. After I updated fstab, Linux boot time was back to normal.

I wonder how this Egg software would overcome this important update of the UUID from restoring the ISO to another PC? So far Clonezilla is the best backup / restore that I have used.

Do you perform your backup with rsync on the running system?

3 Likes

I do when I am backing up my data partition., which I do every night before shutdown
You can do it for the root partition, but I would prefer to do it unmounted… old fashioned they say.
I will test using rsync on / and report back … @ihasama asked me to write someting on that too, so I will reply to you both together.
I dont want to set out something important like that without testing!

5 Likes

It is totally safe backing up root partion while running.
Please note, that systemback.sh refuses doing the back up if it finds apt running, so during and apt upgrade the backup is not possible. Another thing is that it excludes directories like /sys /proc and such.
I use it all the times before a risky thinkering, or a bigger upgrade.
If anything goes wrong (such as wrongly installing amdgpu pro dirvers, which is normally very hard to undo), it just resotres the previously backed up completely healthy system.

2 Likes

That is wise. You could find yourself snapshotting a half completed backup.
Ideally nothing that will write on the root filesystem should be running… eg cron jobs, updates, email, browsing, editing files in /etc,…

1 Like

Backing up via rsync from the filesystem you will get always complete files.
On the other hand, dd-ing the root partition is a different case, as there’s no way to tell whether an updated log file changes in the filesystem something while dd is running, so the image will most probably contain a damaged filesystem.
A working running system changes near nothing on system files, which is about to be backed up.
Maybe log files will change during the backup procedure, after all who cares for them?

I never do such things during a system backup :slight_smile:
That would break the whole point of it.

But as a test, I edited grub file and ran update-grun WHILE doing a backup.
It just finished.
The second run made this output, as the backup is incremental, only the changed files ar backed up this time:

oot@DellG3:/home/laco# /opt/systemback.sh -n
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/home/gazda
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/home/laco
.config/Caprine/
.config/Caprine/Network Persistent State
          4,30K 100%    0,00kB/s    0:00:00 (xfr#1, ir-chk=22555/22806)
.config/chromium/Default/Cookies
          2,42M 100%    3,09MB/s    0:00:00 (xfr#2, ir-chk=1755/26865)
.config/chromium/Default/Cookies-journal
              0 100%    0,00kB/s    0:00:00 (xfr#3, ir-chk=1754/26865)
.config/chromium/Default/Local Storage/leveldb/000116.log
         10,33K 100%   13,02kB/s    0:00:00 (xfr#4, ir-chk=1205/26865)
.config/chromium/Default/WebStorage/QuotaManager
        229,38K 100%  243,74kB/s    0:00:00 (xfr#5, ir-chk=1018/28050)
.config/chromium/Default/WebStorage/QuotaManager-journal
          8,72K 100%    9,27kB/s    0:00:00 (xfr#6, ir-chk=1017/28050)
.local/share/data/Mega Limited/MEGAsync/logs/MEGAsync.log
          8,29M 100%    6,24MB/s    0:00:01 (xfr#7, ir-chk=1001/33132)
.local/share/data/Mega Limited/MEGAsync/logs/mega.gfxworker.14994502-87c7-492a-9dda-f672e69fb78b.log
         32,67M 100%  890,17MB/s    0:00:00 (xfr#8, ir-chk=1000/33132)
.seadrive/data/
.seadrive/data/repo.db
        114,69K 100%  474,58kB/s    0:00:00 (xfr#9, ir-chk=1016/35099)
.seadrive/data/storage/commits/02af558f-42e3-45fb-8d6c-65a94c9f4797/4d/
.seadrive/data/storage/commits/02af558f-42e3-45fb-8d6c-65a94c9f4797/4d/6582a2b4b0ddc01d939ac13bff64fbc1d5304c
            617 100%    2,02kB/s    0:00:00 (xfr#10, ir-chk=1125/35396)
.seadrive/logs/seadrive.log
         34,81M 100%   34,44MB/s    0:00:00 (xfr#11, ir-chk=1020/54613)
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/root
sending incremental file list
boot/grub/
boot/grub/grub.cfg
          5,59K 100%    0,00kB/s    0:00:00 (xfr#1, ir-chk=1126/1165)
etc/default/
etc/default/grub
          1,62K 100%   11,21kB/s    0:00:00 (xfr#2, ir-chk=1136/2756)
home/
var/lib/smartmontools/
var/lib/smartmontools/attrlog.WDC__WDS200T2B0A_00SM50-211032801442.ata.csv
         13,77K 100%    0,00kB/s    0:00:00 (xfr#3, ir-chk=1663/638959)
var/lib/smartmontools/smartd.WDC__WDS200T2B0A_00SM50-211032801442.ata.state
          3,03K 100%    2,89MB/s    0:00:00 (xfr#4, ir-chk=1661/638959)
var/lib/systemd/timesync/clock
              0 100%    0,00kB/s    0:00:00 (xfr#5, to-chk=130/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/system.journal
         16,78M 100%  148,15MB/s    0:00:00 (xfr#6, to-chk=54/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/user-1000.journal
          8,39M 100%   68,97MB/s    0:00:00 (xfr#7, to-chk=52/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/user-1001.journal
          8,39M 100%   65,57MB/s    0:00:00 (xfr#8, to-chk=50/641450)
var/log/samba/log.
         93,32K 100%  740,90kB/s    0:00:00 (xfr#9, to-chk=40/641450)

Setting write protection... done

Calculating checksum... done
oot@DellG3:/home/laco# /opt/systemback.sh -n
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/home/gazda
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/home/laco
.config/Caprine/
.config/Caprine/Network Persistent State
          4,30K 100%    0,00kB/s    0:00:00 (xfr#1, ir-chk=22555/22806)
.config/chromium/Default/Cookies
          2,42M 100%    3,09MB/s    0:00:00 (xfr#2, ir-chk=1755/26865)
.config/chromium/Default/Cookies-journal
              0 100%    0,00kB/s    0:00:00 (xfr#3, ir-chk=1754/26865)
.config/chromium/Default/Local Storage/leveldb/000116.log
         10,33K 100%   13,02kB/s    0:00:00 (xfr#4, ir-chk=1205/26865)
.config/chromium/Default/WebStorage/QuotaManager
        229,38K 100%  243,74kB/s    0:00:00 (xfr#5, ir-chk=1018/28050)
.config/chromium/Default/WebStorage/QuotaManager-journal
          8,72K 100%    9,27kB/s    0:00:00 (xfr#6, ir-chk=1017/28050)
.local/share/data/Mega Limited/MEGAsync/logs/MEGAsync.log
          8,29M 100%    6,24MB/s    0:00:01 (xfr#7, ir-chk=1001/33132)
.local/share/data/Mega Limited/MEGAsync/logs/mega.gfxworker.14994502-87c7-492a-9dda-f672e69fb78b.log
         32,67M 100%  890,17MB/s    0:00:00 (xfr#8, ir-chk=1000/33132)
.seadrive/data/
.seadrive/data/repo.db
        114,69K 100%  474,58kB/s    0:00:00 (xfr#9, ir-chk=1016/35099)
.seadrive/data/storage/commits/02af558f-42e3-45fb-8d6c-65a94c9f4797/4d/
.seadrive/data/storage/commits/02af558f-42e3-45fb-8d6c-65a94c9f4797/4d/6582a2b4b0ddc01d939ac13bff64fbc1d5304c
            617 100%    2,02kB/s    0:00:00 (xfr#10, ir-chk=1125/35396)
.seadrive/logs/seadrive.log
         34,81M 100%   34,44MB/s    0:00:00 (xfr#11, ir-chk=1020/54613)
sending incremental file list
created directory SB_3Q875VZonv1MxVdKvYs4/root
sending incremental file list
boot/grub/
boot/grub/grub.cfg
          5,59K 100%    0,00kB/s    0:00:00 (xfr#1, ir-chk=1126/1165)
etc/default/
etc/default/grub
          1,62K 100%   11,21kB/s    0:00:00 (xfr#2, ir-chk=1136/2756)
home/
var/lib/smartmontools/
var/lib/smartmontools/attrlog.WDC__WDS200T2B0A_00SM50-211032801442.ata.csv
         13,77K 100%    0,00kB/s    0:00:00 (xfr#3, ir-chk=1663/638959)
var/lib/smartmontools/smartd.WDC__WDS200T2B0A_00SM50-211032801442.ata.state
          3,03K 100%    2,89MB/s    0:00:00 (xfr#4, ir-chk=1661/638959)
var/lib/systemd/timesync/clock
              0 100%    0,00kB/s    0:00:00 (xfr#5, to-chk=130/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/system.journal
         16,78M 100%  148,15MB/s    0:00:00 (xfr#6, to-chk=54/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/user-1000.journal
          8,39M 100%   68,97MB/s    0:00:00 (xfr#7, to-chk=52/641450)
var/log/journal/1e6c777d76d14c949b6119d676448a10/user-1001.journal
          8,39M 100%   65,57MB/s    0:00:00 (xfr#8, to-chk=50/641450)
var/log/samba/log.
         93,32K 100%  740,90kB/s    0:00:00 (xfr#9, to-chk=40/641450)

Setting write protection... done

Calculating checksum... done

Flushing filesystem buffers... done

Auto-removing 'ustWrSq3rPGBcgS4R6rv'... done

 The restore point is successfully created.

root@DellG3:/home/laco# 


Flushing filesystem buffers... done

Auto-removing 'ustWrSq3rPGBcgS4R6rv'... done

 The restore point is successfully created.

root@DellG3:/home/laco#

I think both backups are intact despite I changed grub config during the first run.

3 Likes

Think about what happens when multiple files have to be changed in unison… eg during an update

I am thinking, at least for multi-user systems, the best thing would be to go into single-user mode while doing an rsync of a running system.

2 Likes