LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-28-2020, 07:08 PM   #16
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484

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.
 
Old 11-29-2020, 01:32 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by blooperx3 View Post
the source (fat) hdd says "fuse" filesystem.
This sentence does not make sense (to me).
I don't think you can work on fuse filesystems with dd.
Quote:
i copied this hdd using following command: for sure
Code:
sudo dd if=/dev/sdx bs=8M of=/filepath/directory.name
The hdd was 1TB and the image created was 1TB.
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 View Post
If I write it back to disk, what dd command would I use?
Code:
sudo dd if=/filepath/directory.name of=/dev/sdy
You can use any bs.

Last edited by ondoho; 11-29-2020 at 01:34 AM.
 
Old 12-05-2020, 05:18 PM   #18
blooperx3
Member
 
Registered: Nov 2020
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 12-05-2020, 05:19 PM   #19
blooperx3
Member
 
Registered: Nov 2020
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
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.
No, almost a full 1TB.
 
Old 12-05-2020, 05:25 PM   #20
blooperx3
Member
 
Registered: Nov 2020
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Missed your last post.

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.
How would i mount the 1TB (filesystem) image?
 
Old 12-05-2020, 05:52 PM   #21
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Quote:
How would i mount the 1TB (filesystem) image?
See:
Code:
man mount
The man pages are also online.
https://linux.die.net/man/8/mount

You can mount an .iso loopback
 
Old 12-05-2020, 05:59 PM   #22
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Also,

If you want to make a pdf/text from a man page for easier reading
Code:
man -t mount | ps2pdf - output.pdf
man -P cat mount > output.txt
You can also grep a man page
Code:
man mount | grep -- 'loop'
or
Code:
man mount | grep -A 10 'LOOP'
 
Old 12-06-2020, 03:45 AM   #23
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by blooperx3 View Post
I want to write it to a specific 'empty' partition on the target hdd, would adding a number to "sdy" work?
Um.
Aren't we going in circles now?
Yes, the answer is yes, but it might not give the desired result.

Anyhow, I think I'm out.
 
Old 12-06-2020, 11:04 PM   #24
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by blooperx3 View Post
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.

HTH...
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a 1TB Seagate Hard Drive that is failing I can read small files but can't drag big files off doramzy Linux - Hardware 43 05-23-2016 08:43 AM
Samba - Problem viewing directories on Buffalo 1TB disc zdun Debian 2 08-22-2009 03:47 AM
Samba - Problem viewing directories on Buffalo 1TB disc zdun Linux - Networking 1 08-21-2009 03:41 AM
Can I Convert DVD image to CD image? bnchakraborty Linux - Software 1 07-22-2005 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:22 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