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

Re: Using dd to copy a disk.



On Tue, 2003-07-29 at 01:27, Alex Malinovich wrote:
> On Mon, 2003-07-28 at 18:55, Alan Connor wrote:
> > > From ron.l.johnson@cox.net Mon Jul 28 16:24:31 2003
> > > 
> > > 
> > > On Mon, 2003-07-28 at 17:22, Alan Connor wrote:
> > > /var, /etc and /usr/bin, things can get sticky regarding symlinks.
> > > 
> > > If there's a little shell script that can handle multiple symlink
> > > redirection, I'm not smart enough to think of it...
> > > 
> > 
> > Well. I'd start by using find to list all the symlinks that pointed to
> > another device
> --snip--
> 
> Maybe I'm missing something here, but why would it matter? i.e. If a
> symlink points to /usr/bin/gcc-3.2, and you copy it somewhere else,
> it'll still point to /usr/bin/gcc-3.2 and if it points to just gcc-3.2
> it'll continue to point to gcc-3.2 in the current directory, wherever
> that happens to be. So unless you're copying / to /backup or some other
> silly thing, this should be ok, right? Or am I missing some of the finer
> points of multiple mounts throughout the filesystem?

So you have 
/dev/hda1  /
/dev/hda2  /usr
/dev/hda3  /var

that you want to clone to /dev/hdc1, /dev/hdc2, /dev/hdc3.

You must mount, the hdc partitions, as, for example:
/backup/hdc/1
/backup/hdc/2
/backup/hdc/3

Thus, when you copy files from hda to hdc, any absolute symlinks,
or symlinks which have relative references that go "up and then
down", will remain pointed back to their original files on hda.

Symlinks that have multiple redirections (with mixtures of relative
and absolute to make things even messier) also must be considered.

-- 
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+




Reply to: