linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: % more space reqd. when dd is used?
  2001-11-13 12:45 % more space reqd. when dd is used? s.srinivas
@ 2001-11-13  9:54 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2001-11-13  9:54 UTC (permalink / raw)
  To: srinivas.surabhi, linux-kernel

Vasu,

> hi all,
> I have two  physical harddisks /dev/hda1 and /hdb

You have two physical hard disks /dev/hda and /dev/hdb.
 - hda contains a partition /dev/hda1 you want to backup.
 - hdb contains at least one partition /dev/hdb1 on which you want to
   put the backup (unless you use the raw HD formatted).

I'll assume you'll backup to a file in /dev/hdb1.

> 1) i want to copy drive (take backup) to a file ( in /hdb)using dd.
> So how much space( in terms percentage)more is required in /hdb
> for it to be copied successfully.

Don't know the right answer. That shall not need too much overhead.

But I would point out that /dev/hda1 can _not_ be a live filesystem
(I mean you can't do that if /dev/hda1 is mounted, for example as
your root FS), if it is, you'll end up with a backup containing errors
(due to cache).

$ umount /dev/hda1
$ mount /dev/hdb1 /hdb
$ dd if=/dev/hda1 of=/hdb/backup

But if you want, you can also do this:
$ umount /dev/hda1 /dev/hdb1
$ dd if=/dev/hda1 of=/dev/hdb1

That way, /dev/hdb1 needs to be exactly the size of /dev/hda1

> 2) After copying using dd if=/dev/hda1 of=/hdb/backup
> how to retrive it back again in terms of directories and
> sub-directories and files.

Two solutions here:
 - you want to restore /dev/hda1 at the state it was at backup, then
   you dd if=/hdb/backup of=/dev/hda1 (Note that once again /dev/hda1
   must _not_ be mounted)
 - or you just want to access the backup. In this case you need
   a loop device:  mount -o loop /hdb/backup /mnt/backup
   You'll need loop support in your kernel (either built-in or
   module). That way, you can compare the FS against the backup,
   and/or restore part of it (by cp'ing files/directories).

Correct me where I'm wrong.

Regards,
Yann E. MORIN.

--
.---------------------------.----------------------.------------------.
|       Yann E. MORIN       |  Real-Time Embedded  | ASCII RIBBON /"\ |
| phone (+33/0) 299 055 231 |  Software  Designer  |   CAMPAIGN   \ / |
|   fax (+33/0) 299 055 221 °----------------------:   AGAINST     X  |
| yann.morin@atosorigin.com    www.atosorigin.com  |  HTML MAIL   / \ |
°--------------------------------------------------°------------------°



^ permalink raw reply	[flat|nested] 2+ messages in thread

* % more space reqd. when dd is used?
@ 2001-11-13 12:45 s.srinivas
  2001-11-13  9:54 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: s.srinivas @ 2001-11-13 12:45 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

hi all,

I have two  physical harddisks /dev/hda1 and /hdb

1) i want to copy drive (take backup) to a file ( in /hdb)using dd.
So how much space( in terms percentage)more is required in /hdb
for it to be copied successfully.

2) After copying using dd if=/dev/hda1 of=/hdb/backup

how to retrive it back again in terms of directories and sub-directories
and files.

thank u all

regards
vasu



[-- Attachment #2: Wipro_Disclaimer.txt --]
[-- Type: text/plain, Size: 853 bytes --]

The Information contained and transmitted by this E-MAIL is proprietary to Wipro and/or its Customer and is intended 
for use only by the individual or entity to which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this
E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent
of the intended recipient or a  person responsible for delivering the information to the named recipient,  you are
notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way
or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail &
notify us immediately at mailadmin@wipro.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-13  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 12:45 % more space reqd. when dd is used? s.srinivas
2001-11-13  9:54 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).