What dd command do i use to convert a 1TB image file back to files/directories?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you can access the files in the image then attempting to do a restore with dd instead of copying them back would be a lot of wasted time and drive space as well as headaches. I wager you have considerably less space used by the files than the 1 TB in the image.
In any case, your command copied the whole physical hard drive. Nothing to do with filesystems AT ALL.
You have an exact copy of the whole hard drive as a 1TB file.
Quote:
Originally Posted by blooperx3
If I write it back to disk, what dd command would I use?
This sentence does not make sense (to me).
I don't think you can work on fuse filesystems with dd.
In any case, your command copied the whole physical hard drive. Nothing to do with filesystems AT ALL.
You have an exact copy of the whole hard drive as a 1TB file.
Code:
sudo dd if=/filepath/directory.name of=/dev/sdy
You can use any bs.
Thanks for the command. If I want to write it to a specific 'empty' partition on the target hdd, would adding a number to "sdy" work?
Appreciate the help.
If you can access the files in the image then attempting to do a restore with dd instead of copying them back would be a lot of wasted time and drive space as well as headaches. I wager you have considerably less space used by the files than the 1 TB in the image.
You can't use the dd command to restore the files and if you do not want to over write the drive then as suggested mount the filesystem image file and copy the files.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
Quote:
Originally Posted by blooperx3
I know it should be the opposite of the command i used to create it, but that was a long time ago and i do not know which command was used.
Wouldn't you mount the image file using the loopback option (mentioned earlier/above) and restore files from the image using regular file/directory tree commands (`rsync', for example)?
Code:
$ sudo mount <image-file> /mnt -o ro -o loop
$ ls /mnt/*
If this reveals the files you're looking for, you're all set to use `rsync', `cp', or whatever else tool you prefer. I doubt `dd' is the tool to be using for the restores.
I can only recall one instance where I've used `dd' in a backup/restore situation and that involved Oracle raw data partitions and magtape---not regular filesystems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.