Re: copy /var/spool/mail
From: Bill Schindler (wbs_at_wschindler.net)
Date: 01/20/04
- Next message: jrlute: "Re: winXP cannot "see" my Linux harddisk...How can I fix this???"
- Previous message: jrlute: "Re: Sound Problem under RedHat 9.0"
- In reply to: Peter: "copy /var/spool/mail"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jan 2004 02:58:09 GMT
"Peter" <peter@visors.com.hk> wrote in message
news:buhvuv$4lq1@imsp212.netvigator.com...
> Hi,
>
> I am going to copy my /var/spool/mail from one hard disk onto another hard
> disk. I am using Redhat Linux 6.2. Originally this system only has one
> hard disk. Can I just plug in the source hard disk as a slave and the
other
> as a master and then copy the /var/spool/mail from the slave to the
master.
> Will Linux automatically recognize the slave that I put in?
>
> Do I have to run any mount commands?
>
> Thanks.
>
> Peter
>
>
>
>
>Hi Peter,
I am assuming that you are copying from a smaller to larger disk on the
same machine.
Doing what you want is easy. I would like to clarify what I think you are
trying to do though. I assume one computer with a "new" disk drive as the
boot disk and the "old" as the one containing the /var/spool/mail.
If you attach the old drive as a "secondary" or "slave" drive on the same
interface (cable) as the boot drive, then your new (boot) disk is /dev/hda
and your old disk is /dev/hdb. Become root with:
su
<password>
mkdir /mnt/olddisk
mount /dev/hdb3 /mnt/olddisk
NOTE: It has been a while since I ran 6.2 and I almost never use default
mount points, so I am only assuming that /dev/hdb3 contains your /var mount
point.
By doing the mount you can now copy the old mail files to the new drive with
the copy command:
cp /mnt/olddisk/var/spool/mail /var/spool/mail
Be careful, you will overwrite all the files of the same name on the new
drive. You may want to backup your target before you do this.
You can then do
/sbin/shutdown -h now
to shut down your machine and remove the old drive.
Be careful when doing this, I migrate file systems all the time when
upgrading hardware, but you don't sound too sure about this kind of
procedure and you should not attempt to do this kind of thing unless you
understand what is happening.
You may want to look at
man mount
man cp
to review what these commands do.
HTH
Bill
- Next message: jrlute: "Re: winXP cannot "see" my Linux harddisk...How can I fix this???"
- Previous message: jrlute: "Re: Sound Problem under RedHat 9.0"
- In reply to: Peter: "copy /var/spool/mail"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|