View Full Version : Redhat 7.2 - copy /home dir 1 hd to another
TheRealDeal 04-05-2002, 10:51 PM Hi,
I have 2 HD. 1 redhat 7.1 another redhat 7.2.
I want to copy rh7.1 (/home) to the new rh 7.2 /home dir. How can I do this?
I just added another hd to my server but can't seem to find it when i type: <df>
How can I mount it and successfully transfer files from 1 hd to another?
Thanks.
fdisk & mkfs for installing the HD
rsync or tar to copy the file
TheRealDeal 04-05-2002, 11:30 PM How do I use those command you listed? I'm kinda new. I have 2 HD both have OS already.
Originally posted by TheRealDeal
How do I use those command you listed? I'm kinda new. I have 2 HD both have OS already.
See http://www.linuxgazette.com/issue38/cooper.html
It's a bit old however.
TheRealDeal 04-05-2002, 11:49 PM I have 2 scsi drives. /dev/hdb does not seem to exist. Any clue? :confused:
Originally posted by TheRealDeal
I have 2 scsi drives. /dev/hdb does not seem to exist. Any clue? :confused:
/dev/sda, /dev/sdb... for scsi
edit: Post your output
TheRealDeal 04-05-2002, 11:58 PM I tried it: can't seem to find /dev/sda or /dev/sdb
palmtree 04-06-2002, 12:27 AM Have you considered something like this perhaps?
http://reoback.penguinsoup.org/
Laterz,
palmtree
RutRow 04-06-2002, 12:46 AM Originally posted by TheRealDeal
I tried it: can't seem to find /dev/sda or /dev/sdb
Try doing
fdisk -l
(that is a lower case L)
It should show you all the drives and partitions.
palmtree 04-06-2002, 12:59 AM df -k
will also show you this info...
laterz,
palmtree
TheRealDeal 04-06-2002, 01:13 AM Ok now I see /dev/sdb.
I want to do this:
Copy /home from/inside /dev/sdb6
to
/mnt/drive2/home
Thanks for your help.
TheRealDeal 04-06-2002, 01:21 AM I did this: mkfs /dev/hdb6
Did this deleted all my files???
I'm getting this problem:
Couldn't find matching filesystem: LABLE=/home
[FAILED]
Give root password for maintenance
What should I do? I really need the data.. HELP!!!
RutRow 04-06-2002, 02:20 AM Originally posted by TheRealDeal
I did this: mkfs /dev/hdb6
Did this deleted all my files???
Ouch.... why did you do that? Files are now gone.
TheRealDeal 04-06-2002, 02:26 AM Originally posted by RutRow
Ouch.... why did you do that? Files are now gone.
I can't recover it?
RutRow 04-06-2002, 02:29 AM Maybe someone that specializes in HD recovery can.
mkfs is for preparing a 'newly' partitioned HD. You NEVER want to use that on a partition which contains data you need.
palmtree 04-06-2002, 02:34 AM mkfs is like running format on a windows box...
bummer.. :bawling:
Hopefully you have backups?
TheRealDeal 04-06-2002, 02:35 AM When I do fdisk -k
I still see all my partitions tho. Is this normal?
RutRow 04-06-2002, 02:38 AM Originally posted by TheRealDeal
When I do fdisk -k
I still see all my partitions tho. Is this normal?
Yeah, you didn't delete the partion, you just formatted it.
TheRealDeal 04-06-2002, 02:42 AM DAM! Is there a way to check to see if my fs is really formated :confused: :bawling:
TheRealDeal 04-06-2002, 02:53 AM -
palmtree 04-06-2002, 03:08 AM :uhh: I believe this reminds me of a saying by Jack Handey...
"If you ever drop your keys in lava..... Don't try to get them. Just let it go man cause their gone!"
RutRow 04-06-2002, 10:43 AM Originally posted by TheRealDeal
DAM! Is there a way to check to see if my fs is really formated :confused: :bawling:
Well, you can view the contents of the partition. But I am sure it is gone.
If you don't already have a place to mount the partition, do:
cd /
mkdir disk2
Then mount it:
mount /dev/sdb6 /disk2
ls -al disk2
bitserve 04-08-2002, 01:44 AM Originally posted by taz0
fdisk & mkfs for installing the HD
rsync or tar to copy the file
Well someone should have pointed out that taz0's post was bound to lead you to failure.
You really just needed to use the mount command, and not fdisk or mkfs.
StevenG 04-09-2002, 06:33 AM You didn't spot this thread in time Mark......... could have saved the day
OOOPPSS!!
bitserve 04-09-2002, 07:26 PM Originally posted by Dotcomsnz
You didn't spot this thread in time Mark......... could have saved the day
OOOPPSS!!
I think that others posting knew that taz0 had given some potentially dangerous advice, but forgot to mention it.
taz0 probably knew what he was talking about too, but didn't read the question right. Oops.
Oh well. Mistakes happen. Right? :)
StevenG 04-09-2002, 09:56 PM Originally posted by bitserve
I think that others posting knew that taz0 had given some potentially dangerous advice, but forgot to mention it.
taz0 probably knew what he was talking about too, but didn't read the question right. Oops.
Oh well. Mistakes happen. Right? :)
Yeah we all make mistakes at some time or other :-)
Best not to persecute them, after all, we all learn by them.
Originally posted by bitserve
I think that others posting knew that taz0 had given some potentially dangerous advice, but forgot to mention it.
taz0 probably knew what he was talking about too, but didn't read the question right. Oops.
Oh well. Mistakes happen. Right? :)
Sorry, I though he was adding a new hard drive. :( The article should have tipped him.
jahsh 04-10-2002, 05:02 PM i would just mount drive 1 to drive 2 and then copy it over that way:
on second drive mkdir /mnt/disk1
mount /dev/hda /mnt/disk1
then you should be able to copy over the contents of /home.
StevenG 04-10-2002, 05:09 PM Nice tip but I think it's a bit late for that now.
|