0

Is there a program to run in the terminal and tell it to just copy the sectors with information in use to an .img file and ignore the sectors NOT assigned? I need something like that so I can later mount it and not have to use temporary space to unzip the image.

Note: Clonezilla is not what I'm looking for because I need additional space to decompress the copy and mount it.

  • 1
    If there is, I suspect it would be slow to use. It would need to save all used inodes (skipping unused), then to recover files you'd read the directory & access inodes in use; but because they are no longer predictably stored (due to unsaved ones), the read program would have to scan for each (unless it had a new old-inode--new-inode converstion table reducing the space-savings somewhat). The result would be slower in operation (until restored to new disk media), or require second mount-img index file to be created before using (wasting time). Easy to create, but I'm not sure worth it – guiverc Jan 3 at 9:53
  • @guiverc Interesting explanation! Let me tell you that now at the last minute, an idea crossed my mind about this problem. It occurs to me that I could create an empty .img image, format it with fsck and I'm not sure if it would be a good idea, but I could use rsync to synchronize all the current data to the .img image (previously mounted). What do you think of this solution? I'm sure others will like it too because I've seen that later they want to mount their copies. – MarianoM Jan 3 at 10:00
  • 1
    I've not done what you propose, but it would void the mount-img-index/old-inode--new-inode requirement; the cost being longer to create the img, the result faster to use if mounted, and eventual restoration [if it ever occurs]. If used multiple-times, the extra time needed to create would pay dividends, so the end-use-case will dictate which approach better suits (somewhat low-media-costs versus often more expensive time) – guiverc Jan 3 at 10:14
  • askubuntu.com/questions/667291/… Have you tried something like this? – Minty Jan 3 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.