LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-24-2008, 03:30 PM   #1
nonoitall
Member
 
Registered: Feb 2005
Posts: 75

Rep: Reputation: 16
Error when restoring an image with ntfsclone


Earlier this week I cloned a partition using the following command:
Code:
ntfsclone -o - /dev/sda1 | gzip -c > backup.img.gz
Everything went fine and today I wanted to restore the image, so I tried the following:
Code:
gzip -cd backup.img.gz | ntfsclone --overwrite /dev/sda2 -
But I received an error saying:
Code:
ERROR(2): Failed to check '-' mount state: No such file or directory
I managed to restore the image using dd, but obviously the process went less efficiently than it could have if only used portions of the file system had been restored. I know I must be missing something really obvious here, so if one of you guys could point it out to me I'd be eternally grateful. Thanks in advance!
 
Old 02-24-2008, 03:51 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I don't have a windows box handy to try it with but, I do see a couple of differences with your code and my notes.
Code:
Save an NTFS into a compressed image file:

    ntfsclone --save-image -o - /dev/sda1 | gzip -c > backup.img.gz

Restore an NTFS volume from a compressed image file:

    gunzip -c backup.img.gz | \
    ntfsclone --restore-image --overwrite /dev/sda1 -
 
Old 02-24-2008, 05:32 PM   #3
nonoitall
Member
 
Registered: Feb 2005
Posts: 75

Original Poster
Rep: Reputation: 16
According to the ntfsclone documentation, the --save-image and --restore-image switches are for using ntfsclone's special image format (that uses escape codes to mark unused areas, rather than filling them in with zeros or garbage like a standard image). I still wanted the image to be usable with other utilities such as dd and mount, so when I created it I omitted the --save-image option to just get a 'normal' image - and the process worked.

I assumed that ntfsclone could also restore a normal image, but I haven't had any luck getting that to work. If I use --restore-image it complains about it not being the right kind of file or something to that effect (I can check and post a precise error message if need be) which doesn't surprise me since the image isn't in ntfsclone's special format. Can ntfsclone not restore standard images from stdin?

Last edited by nonoitall; 02-24-2008 at 05:35 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A problem with Linux after restoring a partition image JesseB Linux - Newbie 2 11-06-2007 01:31 PM
How to make an image (back-up) for easily restoring tweaked operating system CharlieBucket Linux - Software 2 09-23-2007 04:32 PM
Restoring a split HD image drt1245 Linux - Software 12 12-14-2005 07:11 AM
NIC wont get IP after restoring image.. slug420 Linux - General 2 01-13-2005 07:18 AM
Slightly OT : Restoring Drive Image to Resized Partition dlocalized Linux - Newbie 10 11-28-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration