* A way to transfer drives?
@ 2002-10-31 13:53 1stFlight
2002-10-31 14:52 ` Paul Furness
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: 1stFlight @ 2002-10-31 13:53 UTC (permalink / raw)
To: linux newbie
I'm looking for a way to upgrade my HD and maintain file/directory structure.
I've got a 20GB with partitions for / /home /usr how can I copy/clone this
drive over to it's 60B replacement? Thanks!
Darryl
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: A way to transfer drives?
2002-10-31 13:53 A way to transfer drives? 1stFlight
@ 2002-10-31 14:52 ` Paul Furness
2002-10-31 15:01 ` Paul Furness
2002-10-31 16:59 ` Dragos LUNGU
2002-11-01 0:30 ` lawson_whitney
2 siblings, 1 reply; 12+ messages in thread
From: Paul Furness @ 2002-10-31 14:52 UTC (permalink / raw)
To: 1stFlight; +Cc: linux newbie
Connect the new drive in place as the secondary.
Boot as normal.
Use fdisk as appropriate on the new drive to set up your partitions as
you want them.
Create file systems on the partitions you have created using whatever
file system you are using (eg Ext3). This does not have to be the same
as the previous FS you used.
To copy from one place to another (including sub-dirs) you can use find
and cpio like this:
cd <wherever you are copying _from_
find . -print | cpio -pmudv <wherever you want to put the files>
eg:
cd /usr
find . -print | cpio -pmudv /mnt/newusr
To do root, you can use grep in between the commands:
cd /
find . -print | grep -v newdisk | cpio -pmudv /mnt/newdisk
Paul.
On Thu, 2002-10-31 at 13:53, 1stFlight wrote:
> I'm looking for a way to upgrade my HD and maintain file/directory structure.
> I've got a 20GB with partitions for / /home /usr how can I copy/clone this
> drive over to it's 60B replacement? Thanks!
>
> Darryl
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
Paul Furness
Systems Manager
Steepness is an illusion caused by flat things leaning over.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-10-31 14:52 ` Paul Furness
@ 2002-10-31 15:01 ` Paul Furness
0 siblings, 0 replies; 12+ messages in thread
From: Paul Furness @ 2002-10-31 15:01 UTC (permalink / raw)
To: linux newbie; +Cc: 1stFlight
Excuse the confusion, I wasn't thinking straight. In my examples below,
the < and > are not intended to be used in the command - I just meant to
highlight the source / destination descriptions.
On Thu, 2002-10-31 at 14:52, Paul Furness wrote:
> Connect the new drive in place as the secondary.
> Boot as normal.
> Use fdisk as appropriate on the new drive to set up your partitions as
> you want them.
> Create file systems on the partitions you have created using whatever
> file system you are using (eg Ext3). This does not have to be the same
> as the previous FS you used.
>
> To copy from one place to another (including sub-dirs) you can use find
> and cpio like this:
>
> cd <wherever you are copying _from_
> find . -print | cpio -pmudv <wherever you want to put the files>
>
> eg:
>
> cd /usr
> find . -print | cpio -pmudv /mnt/newusr
>
>
> To do root, you can use grep in between the commands:
>
> cd /
> find . -print | grep -v newdisk | cpio -pmudv /mnt/newdisk
>
>
>
> Paul.
>
>
> On Thu, 2002-10-31 at 13:53, 1stFlight wrote:
> > I'm looking for a way to upgrade my HD and maintain file/directory structure.
> > I've got a 20GB with partitions for / /home /usr how can I copy/clone this
> > drive over to it's 60B replacement? Thanks!
> >
> > Darryl
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.linux-learn.org/faqs
> >
> --
> Paul Furness
>
> Systems Manager
>
> Steepness is an illusion caused by flat things leaning over.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
Paul Furness
Systems Manager
Steepness is an illusion caused by flat things leaning over.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-10-31 13:53 A way to transfer drives? 1stFlight
2002-10-31 14:52 ` Paul Furness
@ 2002-10-31 16:59 ` Dragos LUNGU
2002-11-01 17:04 ` Paul Furness
2002-11-01 0:30 ` lawson_whitney
2 siblings, 1 reply; 12+ messages in thread
From: Dragos LUNGU @ 2002-10-31 16:59 UTC (permalink / raw)
To: 1stFlight; +Cc: linux newbie
1stFlight wrote:
> I'm looking for a way to upgrade my HD and maintain file/directory structure.
> I've got a 20GB with partitions for / /home /usr how can I copy/clone this
> drive over to it's 60B replacement? Thanks!
Hi
just finished this operation last night .
setup :
boot from /dev/hda
/dev/hdb - 40GB (old disk)
/dev/hdc - 60GB (new disk )
# dd if=/dev/hdb of=/dev/hdc bs=2M
it did a perfect,bit by bit, clone . then, i used cfdisk to set up an
additional 20Gb partition for the extra space.
works like a charm .
i always set bs (block size) close to the size of the HDD buffer (2048
in my case)
hope it helps.
dragos
--
| Dragos LUNGU
|
| http://www.xts.ro
| dragos@xts.ro
| mobile (+40)745 379 734
| office (+40)251 190 561
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-10-31 16:59 ` Dragos LUNGU
@ 2002-11-01 17:04 ` Paul Furness
2002-11-03 17:48 ` Dragos LUNGU
0 siblings, 1 reply; 12+ messages in thread
From: Paul Furness @ 2002-11-01 17:04 UTC (permalink / raw)
To: Dragos LUNGU; +Cc: linux newbie
This does, however, have the disadvantage that your existing partitions
are copied but not resized. Eventually, you end up with lots of little
partitions (after a couple of hard disk upgrades...)
P.
On Thu, 2002-10-31 at 16:59, Dragos LUNGU wrote:
>
>
> 1stFlight wrote:
> > I'm looking for a way to upgrade my HD and maintain file/directory structure.
> > I've got a 20GB with partitions for / /home /usr how can I copy/clone this
> > drive over to it's 60B replacement? Thanks!
> Hi
>
> just finished this operation last night .
> setup :
>
> boot from /dev/hda
>
> /dev/hdb - 40GB (old disk)
> /dev/hdc - 60GB (new disk )
>
> # dd if=/dev/hdb of=/dev/hdc bs=2M
>
> it did a perfect,bit by bit, clone . then, i used cfdisk to set up an
> additional 20Gb partition for the extra space.
>
> works like a charm .
>
> i always set bs (block size) close to the size of the HDD buffer (2048
> in my case)
>
> hope it helps.
>
> dragos
>
>
> --
>
> | Dragos LUNGU
> |
> | http://www.xts.ro
> | dragos@xts.ro
> | mobile (+40)745 379 734
> | office (+40)251 190 561
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
Paul Furness
Systems Manager
Steepness is an illusion caused by flat things leaning over.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-10-31 13:53 A way to transfer drives? 1stFlight
2002-10-31 14:52 ` Paul Furness
2002-10-31 16:59 ` Dragos LUNGU
@ 2002-11-01 0:30 ` lawson_whitney
2002-11-02 21:53 ` Michael Scondo
2 siblings, 1 reply; 12+ messages in thread
From: lawson_whitney @ 2002-11-01 0:30 UTC (permalink / raw)
To: 1stflight; +Cc: linux-newbie
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1107 bytes --]
On Thu, 31 Oct 2002, 1stFlight wrote:
> I'm looking for a way to upgrade my HD and maintain file/directory structure.
> I've got a 20GB with partitions for / /home /usr how can I copy/clone this
> drive over to it's 60B replacement? Thanks!
>
> Darryl
I wouldn't copy/clone it, I'd make new partitions in proportion, mount
them on new temporary mount points (make some with mkdir if you
don't have some handy) and use tartar to copy the
filesystems:
tartar / /newslash
tartar /home /newhome
.....
tartar is what I call it, I chose the tar options for just such a use
#!/bin/bash
##copy a directory or partition
tar -C "$1" -cOl . | tar -C "$2" -xpf -
You could use cpio or cp or what you like instead, that is just the way
I would do it.
Some time ago somebody wondered why this did not copy everything in / -
it's not meant to,
Don't forget to reinstall lilo or whatever bootloader you use after
you get the new hd mounted where it is going to go. have a boot floppy
handy. You can install lilo in one place to make it work in another,
but I'm not up to explaining how.
--
---oops---
[-- Attachment #2: Type: TEXT/PLAIN, Size: 87 bytes --]
#!/bin/bash
##copy a directory or partition
tar -C "$1" -cOl . | tar -C "$2" -xpf -
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-11-01 0:30 ` lawson_whitney
@ 2002-11-02 21:53 ` Michael Scondo
2002-11-03 0:57 ` lawson_whitney
0 siblings, 1 reply; 12+ messages in thread
From: Michael Scondo @ 2002-11-02 21:53 UTC (permalink / raw)
To: linux-newbie
Am Freitag, 1. November 2002 01:30 schrieb lawson_whitney@juno.com:
> On Thu, 31 Oct 2002, 1stFlight wrote:
> > I'm looking for a way to upgrade my HD and maintain file/directory
> > structure. I've got a 20GB with partitions for / /home /usr how can I
> > copy/clone this drive over to it's 60B replacement? Thanks!
> >
> > Darryl
>
> I wouldn't copy/clone it, I'd make new partitions in proportion, mount
> them on new temporary mount points (make some with mkdir if you
> don't have some handy) and use tartar to copy the
> filesystems:
> tartar / /newslash
> tartar /home /newhome
> .....
>
> tartar is what I call it, I chose the tar options for just such a use
>
> #!/bin/bash
> ##copy a directory or partition
> tar -C "$1" -cOl . | tar -C "$2" -xpf -
>
That's an idea, but I believe parted should be much faster.
I think compressing and decompressing would be a little bit slow ?
Regarding,
Michael
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-11-02 21:53 ` Michael Scondo
@ 2002-11-03 0:57 ` lawson_whitney
2002-11-04 9:40 ` Paul Furness
0 siblings, 1 reply; 12+ messages in thread
From: lawson_whitney @ 2002-11-03 0:57 UTC (permalink / raw)
To: michael_scondo; +Cc: linux-newbie
On Sat, 2 Nov 2002, Michael Scondo wrote:
> > #!/bin/bash
> > ##copy a directory or partition
> > tar -C "$1" -cOl . | tar -C "$2" -xpf -
> >
>
> That's an idea, but I believe parted should be much faster.
> I think compressing and decompressing would be a little bit slow ?
>
It's not compressing and decompressing. Tar only does that if you tell
it (with an option I,y,z,Z or the corresponding long names or
--use-compress-program). Saving and restoring this way will also
defragment the filesystem.
> Regarding,
> Michael
> -
--
---oops---
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-11-03 0:57 ` lawson_whitney
@ 2002-11-04 9:40 ` Paul Furness
2002-11-04 21:37 ` lawson_whitney
0 siblings, 1 reply; 12+ messages in thread
From: Paul Furness @ 2002-11-04 9:40 UTC (permalink / raw)
To: linux-newbie
There is only one snag with tartar: it doesn't pick up 'dot' files in
the starting directory.
On Sun, 2002-11-03 at 00:57, lawson_whitney@juno.com wrote:
> On Sat, 2 Nov 2002, Michael Scondo wrote:
>
> > > #!/bin/bash
> > > ##copy a directory or partition
> > > tar -C "$1" -cOl . | tar -C "$2" -xpf -
> > >
> >
> > That's an idea, but I believe parted should be much faster.
> > I think compressing and decompressing would be a little bit slow ?
> >
> It's not compressing and decompressing. Tar only does that if you tell
> it (with an option I,y,z,Z or the corresponding long names or
> --use-compress-program). Saving and restoring this way will also
> defragment the filesystem.
>
> > Regarding,
> > Michael
> > -
> --
> ---oops---
>
>
>
> ________________________________________________________________
> Sign Up for Juno Platinum Internet Access Today
> Only $9.95 per month!
> Visit www.juno.com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
Paul Furness
Systems Manager
Steepness is an illusion caused by flat things leaning over.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-11-04 9:40 ` Paul Furness
@ 2002-11-04 21:37 ` lawson_whitney
2002-11-05 9:00 ` Paul Furness
0 siblings, 1 reply; 12+ messages in thread
From: lawson_whitney @ 2002-11-04 21:37 UTC (permalink / raw)
To: paul.furness; +Cc: linux-newbie
On 4 Nov 2002, Paul Furness wrote:
> There is only one snag with tartar: it doesn't pick up 'dot' files in
> the starting directory.
If you mean files of the form .name, I can't see that it doesn't.
ls won't show them without -a though.
Lawson
---oops---
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: A way to transfer drives?
2002-11-04 21:37 ` lawson_whitney
@ 2002-11-05 9:00 ` Paul Furness
0 siblings, 0 replies; 12+ messages in thread
From: Paul Furness @ 2002-11-05 9:00 UTC (permalink / raw)
To: linux-newbie
My apologies, you are correct. I think my brain stepped out for a
moment... :)
To be exact: if you tar using a directory name, it works fine, but if
you use a wild card it doesn't see dot files (because that's how
wildcard expansion works).
thus:
cd $HOME
tar -cvf /archive/homedir.tar *
will not do the same as:
cd $HOME
tar -cvf /archive/homedir.tar .
The first example will not save anything who's name begins with a dot,
but the second one will.
A thing to know about:
cd /
tar -cvf /archive/homedir.tar $HOME
will store the full path of everything in your home dir. This means that
if you try and extract it later on, it will try and put all the files
back _exactly_ where they came from in the first place.
Although this sounds like a fine idea for a backup, I have found that it
makes more sense to avoid the full paths for user generated data,
because there will always be the time when you want to get back the
backup and compare it to what you already have - which is much more
complicated if you have the full paths stored in the archive.
It also means that restoring the stuff to a different machine is harder,
because you need an identical directory structure - less of a problem
with a home dir, but it could be something more complicated like this:
tar -cvf /archive/backup.tar /usr/local/data/bungle/source/c/big_project
Paul.
On Mon, 2002-11-04 at 21:37, lawson_whitney@juno.com wrote:
> On 4 Nov 2002, Paul Furness wrote:
>
> > There is only one snag with tartar: it doesn't pick up 'dot' files in
> > the starting directory.
>
> If you mean files of the form .name, I can't see that it doesn't.
> ls won't show them without -a though.
>
> Lawson
> ---oops---
>
>
>
> ________________________________________________________________
> Sign Up for Juno Platinum Internet Access Today
> Only $9.95 per month!
> Visit www.juno.com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
Paul Furness
Systems Manager
Steepness is an illusion caused by flat things leaning over.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2002-11-05 9:00 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-31 13:53 A way to transfer drives? 1stFlight
2002-10-31 14:52 ` Paul Furness
2002-10-31 15:01 ` Paul Furness
2002-10-31 16:59 ` Dragos LUNGU
2002-11-01 17:04 ` Paul Furness
2002-11-03 17:48 ` Dragos LUNGU
2002-11-01 0:30 ` lawson_whitney
2002-11-02 21:53 ` Michael Scondo
2002-11-03 0:57 ` lawson_whitney
2002-11-04 9:40 ` Paul Furness
2002-11-04 21:37 ` lawson_whitney
2002-11-05 9:00 ` Paul Furness
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox