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

Re: Help transfering data....



Hi,

/proc (and things like /dev/audio and /dev/hda1) aren't regular files and
so can't be copied using "cp". To copy things like this successfully, you
could use tar. Here's an example: Suppose you want to copy your /
directory from one disk to another. I'm assuming the new disk is empty but
has a file system on it. You could type the following:

cd /
tar -cvf /mnt/root.tar /

This would put a file called "root.tar" on your new hard drive which, when
unpacked, would simply be the contents of your old / directory with all
the block and character devices intact along with the regular files and
all their permissions. You could unpack the archive as follows:

cd /mnt
tar -xvf root.tar

So much for transferring the files. If you want the new disk to boot,
you'd have to put a copy of the master boot record on the new disk with
lilo. Change the settings in /etc/lilo.conf and run lilo. That's basically
what to do but you should read the lilo manual carefully to make sure you 
have the right device names and that your partitions on the new drive are
appropriate. Another command aside from "tar" which will do the copying is
"cpio". Both commands will allow you to do this copying without and
intermediate tar file I think but the above is the most straightforward.
Good luck...

J. Goldman

On Thu, 10 Jul 1997, Kevin J Poorman wrote:

> Hi.
> 
> I just got a new hard drive and wish to transfer my root fs to this new
> drive as it is larger....
> 
> now to the hard part ...
> 
> I Tryed to do a cp -a * /mnt (where the new hd was mounted)
> 
> but it sat there cp'ing files for an hour and never got past the proc
> directory .... did I do something wrong ...
> 
> 
> I know that before on this list some published a way to do this with tar
> I would like to do it that way if posible ....
> 
> 
> thanks in advance
> 
> -Kevin 
> ><>
> 
> 
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> debian-user-request@lists.debian.org . 
> Trouble?  e-mail to templin@bucknell.edu .
> 



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: