Re: tar a flash drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/09/2019 16.12, ToddAndMargo via users wrote:
On 9/3/19 10:59 PM, John Harris wrote:
On Tuesday, September 3, 2019 10:03:21 PM MST ToddAndMargo via users wrote:
Hi All,

I have a flash drive with about four partitions on is.
Lets call it /dev/sdc.

Can I tar sdc or am I stuck with tarring the partitions?

Any drawback to this?

If you were to `tar` it, you'd be making an archive with a single file named
'sdc'. I suggest you do this:

dd if=/dev/sdc of=/path/to/file
gzip /path/to/file

(Feel free to use some other software for compression)


This looks like what I want.  Thank you!

Is there a way to pipe the dd into the gzip file?

As for your question (but see later), yes:
	dd if=/dev/sdc | gzip >file.gz
but
- gzip may not be the most suitable compression
- to improve the compression, mount each partition and create a large file of zeroes
	sudo mount /dev/sdXn /path/to/mountPoint
	dd if=/dev/zero of=/path/to/mountPoint/zero
	rm /path/to/mountPoint/zero
	sudo umount /path/to/mountPoint
Now you can do the dd and expect a smaller gz file.

However, the most important question that needs answering is this:
	What is the purpose of this exercise?
- is this for backup - not expecting to read it again.
	dd is OK
	but clonezilla will do a better job (no need to do the zero thing)
- is this to allow transferring the data to another USB disk
	clonezilla is your friend again
- will you need regular access to individual files on these partitions?
	mount each partition and copy (rsync) the content to where you want it

HTH

--
Eyal at Home (fedora@xxxxxxxxxxxxxx)
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux