I've got an SSD with a linux OS on it which I'm not currently using. The SSD usually sits in my desktop computer, but I won't be using it for a while.
I would like to use the SSD in my laptop for a while. Since they're pretty expensive still I don't really want to buy another while I have a perfectly good one here.
I thought about using
dd to clone the disk so that I could restore it in the future if I need to get my desktop system working again. However it's 240 GB in size but only 5 GB is currently in use, so ideally I would like to be able to clone it without using all this space.
Would this be possible if I compressed the output iso image?
Can I just "copy" the files I need for later (including hidden ones?) using rsync? This will be only ~ 5 GB in size - but will I be able to restore these files correctly? eg; I might need to preserve permissions while doing this to prevent problems when I restore the files to the SSD?
Is there a better method?
The OS is either debian/ubuntu.