From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: <srinivas.surabhi@wipro.com>, <linux-kernel@vger.kernel.org>
Subject: Re: % more space reqd. when dd is used?
Date: Tue, 13 Nov 2001 10:54:25 +0100 [thread overview]
Message-ID: <010e01c16c29$2dce2c70$8a140237@rennes.si.fr.atosorigin.com> (raw)
In-Reply-To: <3BF11605.335EBC76@wipro.com>
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 / \ |
°--------------------------------------------------°------------------°
prev parent reply other threads:[~2001-11-13 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-13 12:45 s.srinivas
2001-11-13 9:54 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='010e01c16c29$2dce2c70$8a140237@rennes.si.fr.atosorigin.com' \
--to=yann.morin.1998@anciens.enib.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.surabhi@wipro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®