On Sat, Jan 17, 2004 at 08:41:07AM -0600, Florin Iucha wrote:
> On Sat, Jan 17, 2004 at 12:26:54AM -0600, Samuel MacDonald wrote:
> > hda has my O/S as well as all my data on different shares that I've 
> > created.  
> > hdb has one huge 120GB (roughly)partition with /tmp directory mounted to 
> > it.  
> > So, here's what I want to do.  I want to copy all the data from hda to hdb. 
> > After that I'll install Fedora on hda and leave all the data on hdb.
> > 
> > Do I just go into /etc/fstab and mount /tmp to somewhere on hda to get it 
> > off
> > of hdb?  
> 
> Mount your partition on hdb to something other than /tmp. If you
> add that mount to fstab and reboot, some init scripts might try to clean up
> /tmp for you. Bad!

I agree, your buddy should be whipped at least 50 slashes, /tmp is a
critcal part of your unix file system and not an arbitrary mount point.

I find myself making mount points for arbitrary data stores like
/hdb2
or:
/mnt/hdb2
to reflect the physical partition they live on.
then when you say cp -a /hdb2/mystuff /hdc4 it helps keep track of
what harddrive/partition you are dealing with.
And when you do a df command, you can associate that easily.
 
> # Create a directory under /mnt
> mkdir /mnt/all_my_files
> # then mount your partition manually, replacing hdb1 with the actual
> # partition number
> mount /dev/hdb1 /mnt/all_my_files
> # copy all the files
> cp -ax /home /mnt/all_my_files
> cp -ax /other/stuff /mnt/all_my_files

Florin, whats with the -x option?  "stay on this file system" is what
man cp tells me.  But he is trying to copy from one file system to another,
not only that but they are on different devices.  So why would you
use this option?

On my debian unstable system it appears to do nothing when I try it:
cp -ax /hda8/stuff /hdb6
It copies it over, no complaints.

Looking at source code for cp, it appears to make some effort to not
copy if this option is set, maybe it is a busted?

Is this a trick question?
Can I win a prize?  Beer?

> # unmount your files
> umount /mnt/all_my_files
> # if you are really paranoid, disconnect hdb while installing
> 
> Cheers,
> florin
> 
> -- 
> 
> Don't question authority: they don't know either!

So Sam, is your buddy trying to back up his GNU/Linux as well as his
data on hda?

You can do this, just don't try to copy /proc.
/proc goes on forever if you try and copy it.

So for example, he could copy over his existing system files over
to the other harddrive as a backup and actually make it
bootable just in case he wants to get back in to the old system.
This takes a bit more work to arrange the bootloader to boot into
it(and adjust /etc/fstab / setting), but it is doable.

seeya,

Karl.



_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list