Clone only the data from disk to .img disk file?












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.










share|improve this question




















  • 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
















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.










share|improve this question




















  • 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














0












0








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.










share|improve this question
















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.







mount hard-drive clone






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 10:31







MarianoM

















asked Jan 3 at 9:41









MarianoMMarianoM

6810




6810








  • 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














  • 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








1




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





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







@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




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





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





askubuntu.com/questions/667291/… Have you tried something like this?

– Minty
Jan 3 at 13:21










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106535%2fclone-only-the-data-from-disk-to-img-disk-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106535%2fclone-only-the-data-from-disk-to-img-disk-file%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅