How to simplify backups

I use rsync to backup my running Leap 15.0 and find it fast and reliable. Is it possible to use rsync to backup my entire hard drive which holds two other OSes without having to boot into those? My data for all OSes is shared on a common partition, but their roots and homes involve four different unmounted partitions. Or is there other software that can do this and simulates rsync in only backing up files that have changed since the last backup.

Thanks in advance.

I am not quite sure I understand you fully.

But a system can only access files on mounted file systems and thus rsync can only access files on mounted file systems.

Thus assuming that your running/booted system has mounted /dev/sdxn as /home, you can mount the home partition of your not runing/booted file system on /dev/sdym on /mnt/home-of-systemb (maybe read-only when it is only for making a backup of it?).

Then rsync (or whatever) can access it and make backups like any other. You should however take note/remember which home directory is copied to where.

Lacking any details on how you use rsync (to the same system, to another system, syncing from server to client or vv, etc.) I kept the above example as, well an example, which a lot to be filled in.

I use luckybackup as superuser and it works as you described mounting backupping and unmounting partitions

Thank you Henk, mounting the other partitions is what I thought I would have to do. I was just looking for an easy solution.

Thanks for the recommendation. Unfortunately the development of luckybackup is almost frozen. Some of my file system uses non-ASCII characters and that might be a problem.

I have no idea what you find easy. But, as @pier_andreit suggests, adding mount and umount statements to your backup scripts is easy enough imho. :wink:

I do regular backups and stick to some healthy paranoia:

  • Mirror /home residing on SSD to HDD: rsync -av /home/ /home-HDD/ on hosts erlangen and hofkirchen.
  • Mirror /home to removable disk: rsync -av /home/ /run/media/karl/WD25/backup/home/
  • When travelling update the other host by mirroring from removable disk: rsync -av /run/media/karl/WD25/backup/home/ /home/

Hosts have multiple disks:

:~ # inxi -zDxx
Drives:    Local Storage: total: 4.32 TiB used: 2.74 TiB (63.4%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB speed: 6.0 Gb/s serial: <filter> 
           ID-2: /dev/sdb vendor: Seagate model: ST2000DM001-1CH164 size: 1.82 TiB speed: 6.0 Gb/s serial: <filter> 
           ID-3: /dev/sdc vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB speed: 6.0 Gb/s serial: <filter> 
           ID-4: /dev/sdd vendor: Western Digital model: WD20NMVW-11EDZS3 size: 1.82 TiB serial: <filter> 
:~ # 

The SSDs hold /home and system partitions for several distributions:

:~ # inxi -zPxx
Partition: ID-1: / size: 29.40 GiB used: 16.46 GiB (56.0%) fs: ext4 dev: /dev/sda2 
           ID-2: /home size: 427.82 GiB used: 252.70 GiB (59.1%) fs: ext4 dev: /dev/sda3 
:~ # 

There is a backup of Tumbleweed system partition /dev/sda2 on /dev/sdc2 just in case something goes terribly wrong. I run zypper dup on the backup system /dev/sdc2 a few times a year, but I don’t mirror from /dev/sda2.

I added all partitions to /etc/fstab, but only mount the needed ones at boot.

:~ # lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   100M  0 part /boot/efi
├─sda2   8:2    0    30G  0 part /
└─sda3   8:3    0 435.7G  0 part /home
sdb      8:16   0   1.8T  0 disk 
├─sdb1   8:17   0  16.1G  0 part 
└─sdb6   8:22   0   1.8T  0 part /home-HDD
sdc      8:32   0 232.9G  0 disk 
├─sdc1   8:33   0   100M  0 part 
├─sdc2   8:34   0    30G  0 part 
├─sdc3   8:35   0    40G  0 part 
├─sdc4   8:36   0  29.3G  0 part 
├─sdc5   8:37   0    28G  0 part 
└─sdc6   8:38   0   105M  0 part 
sdd      8:48   0   1.8T  0 disk 
└─sdd1   8:49   0   1.8T  0 part /run/media/karl/WD25
sr0     11:0    1  1024M  0 rom  
:~ # 

Given the above I never felt the need to use additional software.