So far I have been using restic in one machine only. That means it uses the same directory structure. For example, I have been backing up the absolute path “/media//data”. But now I am migrating to another machine with a different username. I want to restore the data directory into /media//data, but now that does not work because I already backed it up with absolute path.
I understand how restic handles absolute and relative paths, but I wanted to know if there is an easy way to restore a subdirectory without full path even if I back it up with an absolute path?
I think there’s no option to do that. Just restore into a temporary folder and then move all files to the correct one.
Thanks, Too bad I realized this late. Now I will have to create new backups with relative paths.
Uh, no? Did you even read what Michael wrote? You do not need to run new backups - all you need to do is restore your stuff backed up as
/media/data to e.g.
/media/temp and then just
mv /media/temp/media/data /media/data and you’re done. It’s just one extra little move command, that’s all there’s to it.
Yes, I understood. I am doing exactly that now. But, I just wanted to avoid this situation in the future.