After booting your server into a rescue mode and mounting your server’s file system to a mount point like "/mnt/origin” you will need to adjust your rsync command accordingly.
First make sure you create an exclude file and make any changes necessary for your environment as explained in the "Rsync excludes” section of this article on live server migration. Create the list without mentioning the mount point stuff, just list them as they would appear in your regular file system.
An example exclude file would look just like one used for a live migration:
Next we’ll set up our rsync command so it takes the mount points of the file systems on both servers into account. The rsync command with the origin server in a rescue mode would be:
sudo rsync -e 'ssh -p 30000' -azPx --delete-after --exclude-from="/mnt/origin/home/demo/exclude.txt" /mnt/origin/ firstname.lastname@example.org:/
Note the trailing "/” on the origin directory. Including the slash at the end makes sure rsync treats the origin and destination
directories as the same relative locations, so don’t leave that part out. Otherwise you might end up with your files getting
copied into a new subdirectory on the destination instead of sending the files to their proper locations.
As a bonus, with that trailing slash on the directories rsync will treat the exclude file list as relative to the source directory.
That’s why we don’t need to change the exclude file to account for the mount point.