I'm using a Time Machine like backup script, that creates a partial backup to an external drive using hard links:#!/bin/bashdate=`date +%Y-%m-%dT%H-%M-%S`backup=/mnt/backuptargets=/ /data/seafile /boot /boot/efimkdir -p $backup/logs rsync -a \    --stats \    --partial \    -h \    -H \    -A \    -X \    -x \    --log-file=$backup/logs/$date.log \    --exclude='/media/**' --exclude='/mnt/**' --exclude='/proc/**' --exclude='/sys/**' --exclude='/tmp/**' --exclude='/run/**' --exclude='/dev/**' \    $targets \    --link-dest=$backup/latest \    $backup/incomplete_$date \    && mv $backup/incomplete_$date $backup/$date \    && rm -f $backup/latest \    && ln -s $backup/$date $backup/latestResult:/mnt/backup/ 2016-05-24T16-33-08... 2016-12-01T22-04-25 2016-12-05T20-29-52 latest -> /mnt/backup/2016-12-05T20-29-52 logs lost+foundThis worked fine so far, until I started to use LVM and split up my data to different mount points. Now the contents of these backups look like this:/mnt/backup/latest bin boot data... efi... seafile...What I actually intented is that rsync copies every item of the list / /data/seafile /boot /boot/efi to the proper location in the hierarchy, so for e.g. the folders should end up like this:/mnt/backup/latest boot  efi... data  seafileThe reason why I have to specify every target is the -x option. This stops rsync from crossing a file system border during the recursion. A simple solution would be to:remove the -x flagspecify only / as targetBut this gives me some additional disadvantages. For example I would have to exclude any unwanted mount point with an additional --exclude='/.../**' tag. For now these aren't too much, but I'd rather like to have an opt-in instead of an opt-out solution.
Use rsync copy multiple directories to the same location; keep tree
filesystems;mount;rsync
You should be able to get the effect you want with the -R (or --relative) flag. The reproduces the full path of the source in the destination, eg rsync -aR /a/b/c /dest will create a directory /dest/a/b/c.  Your --link-dest should still work but only once you have done a first new copy, so you may prefer to move the directories around in your last backup to match the new hierarchy or not all the hard links will be made.