0
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.
1
Possible duplicate of Clone only space in use from hard disk
– Kamil Maciorowski – 2017-12-25T16:57:05.8331Clonezilla – anders – 2017-12-25T17:24:04.237
1Just using rsync (with --archive) is probably easiest. @AndersD Clonezilla's still basically a linux distribution with terminal menus? Would be nice to just use it's "workings" directly yourself, seems like it's a big wrapper for
dd
? – Xen2050 – 2017-12-25T23:05:13.523And the possible Dup Q is about saving any disk's used space, this Q is basically about backing up a linux system disk, not a real duplicate – Xen2050 – 2017-12-25T23:15:54.870
Ofcourse it's nice to be able to do stuff directly on CLI, but what is right for you in your situation is not always whats right for the next guy. I understand it like this: He wants a full backup with MBR in case he wants to "reinstall" his desktop back to its former glory. Then clonezilla does the work nicely, and the backup will only be 5GB if that is the disk space he has used. And its more like a one click restore process when and if the decides to use the desktop again. – anders – 2017-12-26T11:44:50.267
@Anders Do you have proof that Clonezilla's backup will only be 5GB, and not a full raw copy of the 240GB partition? The help only shows cloning disk & partitions. That sounds like a
– Xen2050 – 2017-12-27T01:17:36.280dd
copy, including 245GB of free space (that could have old possibly uncompressible data too, if clonezilla even uses compression)"Clonezilla saves and restores only used blocks in the hard disk. Sector-to-sector copying (by dd) is only done with unsupported file systems (read Features). And I know, not only by actually reading what the software does, but by using it. You can't look at at a screenshot and assume what the software does behind the scenes. This is how clonezilla operates: MBR (by dd) Partition table (by sfdisk and parted), CHS of disk. Data on every partition or LV (logical volume) (by partimage, ntfsclone, partclone or dd. It depends on the "-q" option you choose). Your way is l33t though! – anders – 2017-12-27T09:41:00.690
@Anders Thanks, that's interesting, definitely more versatile than I'd though. They really need to work on their help pages, you'd think they'd mention the tool names more in their how-to guides & screenshots itself., and the wall of text that is their home page is TL;DR ;-) Partimage & Partclone are in Debian's repos, ntfsclone is in
ntfs-3g
so probably already installed in most linux's (Clonezilla's page has a dead link to the ntfs tools' page) so they can be used "your favourite" linux. – Xen2050 – 2017-12-27T22:30:44.880