Solved

Am I doing something wrong here?

Posted on 2004-09-26
7
202 Views
Last Modified: 2010-04-20
dd bs=2048 if=/dev/hda1 | split -b 2000m - /mnt/1/1.img

Currently it takes 30 mins for the above command for 20 gigs without th bs paramater. I've tried bs=4096 and bs=2048 but the speed doesn't get affected and stas on 30 mins.

Any ideas how dd can be speeded up?

Thanks
0
Comment
Question by:bunny47
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:fulp02
ID: 12154273
You are not going to be able to  You  are moving 20 Gigs . the only
way is you need more memory or a faster processor and faster hard drives
I am sorry i know it sucks but it is pretty much the only way.

Or you can keep moving the bs up and see if that keeps the drive rapidly reading more
0
 

Author Comment

by:bunny47
ID: 12154483
WHy is that, why doesn't the bs= work with a 20 gig drive :-( Is there no way I can make it speed up?



Thanks

0
 
LVL 2

Expert Comment

by:fulp02
ID: 12155036
The Problem Is that your drive is to slow . You can only read as fast as the drive will let
you and write is the same, Now if you had two seperate hard drives in there it would be a diffrent story
you could read from one and write to the other. and that should speed it up a good amount.

Maybe if you had 3 hard drives
two in a software raid and one to back up to that  would increase by at least a quater of the time ,
You could also make cron jobs so it backs up everynight while you are not using your computer personaly
that is what i would do .
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 4

Expert Comment

by:EinarTh
ID: 12159394
you should look at the hdparm command. Maybe you could tweak the drive a bit....
0
 
LVL 4

Expert Comment

by:bytta
ID: 12245323
It might help to know why you are doing this - maybe some incremental program like rsync would do a better job...
0
 

Author Comment

by:bunny47
ID: 12268129
Hi, Sorry for the late reply :-(

Okay here's some background - I've got a OS/2 box with on physical drive partitioned as hda2 and hda5 with some extra free space, I want to connect another local drive onto the machine (think it's gonna be hdb1) and make a complete backup of the partitions, boot record, partition table, and data. When I restore the data back from hdb1 (my 2nd physical drive I've inserted) onto hda.

So in other words a blank hard drive (primary) can be fully restored as above > boot record, partition tables, data and partitions - hda2 and hda5...

I've tried partimage but I get a segmentation fault > I think partimage is having trouble reading the filesystem which is hpfs.

-----------------------------------------------------------------------------------------

It kinda works with dd as follows:

 clear
mkdir /mnt/1
mount /dev/hdb1 /mnt/1
 clear
cd /mnt/1
dd if=/dev/hda of=backup-hda.mbr count=1 bs=512
sfdisk -d /dev/hda > backup-hda.sf
 clear
echo Backup has started, please be patient...
dd bs=4096 if=/dev/hda1 | split -b 200m - /mnt/1/image.img
 clear
cd /mnt/1
dd if=/dev/hda of=backup-hda.mbr count=1 bs=4096
sfdisk -d /dev/hda > backup-hda.sf
clear


-----------------------------------------------------------------------------------------
And the restore:

 clear
mkdir /mnt/1
mount -t hpfs /dev/hdb1 /mnt/1
mount /dev/hdb1 /mnt/1
                    echo The restore begins...
cat bs=4096 /mnt/1/1.imgaa | dd of=/dev/hda1
clear
mount -t hpfs /dev/hdb1 /mnt/sydos
mount /dev/hdb1 /mnt/sydos
cd /mnt/sydos
dd if=backup-hda.mbr of=/dev/hda
sfdisk /dev/hda < backup-hda.sf

-----------------------------------------------------------------------------------------

The problem is the speed, I'm backing up a 20 gig drive that's set as slave on the same ide cable sa the master that's running OS/2 My 2 hard drives are 3 x 7200rpm western digital... Surely I can speed it up somehow?

Thanks a Mil for all the input so far!!!!!!!!!!!!!
0
 
LVL 4

Accepted Solution

by:
bytta earned 500 total points
ID: 12271235
Again - I recommend rsync for the job.

To my knowledge - it can not copy to/from an img file, but as it only copies the files that have changed you will probably just need to copy 0-2 Gb each time (depending on how often you backup). This way your backup has the same structure as the original so accessing a single file from it does not require a restore.

The first time everything will need to be copied so it WILL take longer than your 30 min dd command, but after that the process will probably take much less time.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migrating a Linux server to VMware 3 140
UM7 Stop Sending packets with GPS Sensor 1 44
IMAP copying tool 14 75
sed command 3 27
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question