When I was upgrading several devices a while ago, there was a problem that meant backups made with Q were not successfully restored after flashing R. This post describes how to work round this problem:
The same approach - deleting the lineagesettings files should allow a dirty flash (i.e. flash without data wipe) to work. I would still make a backup first though