LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2007, 01:56 PM   #1
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
split utility in pipes: backup to FAT32 (4GB limit)


As a follow-up to my thread about dd, in which pwc101 suggested to use

dd if=/dev/hda | gzip > /mnt/hdb1/system_drive_backup.img.gz

("gzip -dc /mnt/hdb1/system_drive_backup.img.gz | dd of=/dev/hda" to restore)

Recap (skip this paragraph if you read my first thread): I need to backup an entire Windows drive with several partitions, including one formatted as Compaq rescue partition (that's what fdisk tells me), onto an external USB drive; the windows drive has a lot of free space on at least one of the partitions, so I asked how to avoid having an 80GB image, 30GB of which is empty.


I have now been painfully reminded that the FAT32 filesystem will only accept files of 4GB max., so I'll need to split the files.

Is it possible to split the files in transit? I guess I could split them first, and later compress them on the disk, although this will require more space initially.

At somewhat greater effort, I could try to reformat the drive to a different file format. I understand that FAT32 is the only one that OS X, Linux and Windows can all read _and_ write, but something that only Linux and OS X can work with is probably good enough for the job. Which one to use?

What are your thoughts? Split or reformat?


Thanks,

Samsara
.
 
Old 01-26-2007, 05:08 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
dd if=/dev/hda | gzip > /mnt/hdb1/system_drive_backup.img.gz- | split -b 2000MB

It will save the files as:

system_drive_backup.img.gz-aa
system_drive_backup.img.gz-ab

To restore use:

cat system-drive_backup* | gzip -dc | dd of=/dev/hda
 
Old 01-26-2007, 07:13 PM   #3
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Original Poster
Rep: Reputation: 32
Sorry, but that syntax is definitely not correct. It does not lead to the desired result.

Samsara
.
 
Old 01-27-2007, 12:25 AM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Below is the correct way:

To create the compressed image:

dd if=/dev/hda | gzip -c | split -b 2000m - system_drive_backup.img.gz.

It will create the 2GB files:

system_drive_backup.img.gz.aa
system_drive_backup.img.gz.ab

To restore:

cat system_drive_backup.img.gz.* | gzip -dc | dd of=/dev/hda

Mount an external USB drive or a remote NFS drive for the dumps. I would recommend first to empty out the unused blocks of your hard disk with zeros, using command:

dd if=/dev/zero of=filefullofzeros && rm filefullofzeros

Otherwize the dd command will dump the bits of even the files that where previously deleted.

Refer to document:

http://wiki.linuxquestions.org/wiki/...ns_using_split
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Split external HD partition to FAT32 / reiserfs Marinus Linux - Hardware 1 05-12-2006 10:33 AM
backup utility saini_mw Linux - Software 1 04-18-2006 10:16 AM
Files > 4GB on FAT32 Luke771 Linux - General 7 02-01-2006 06:43 AM
Linker option or utility to split out size of .o files e2vincent Linux - General 1 04-15-2005 02:50 AM
Linux FAT32 errorscan utility? MatthewTux Linux - Software 1 04-26-2003 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration