Click to See Complete Forum and Search --> : New Hard Drive
MighMos
05-03-2003, 10:28 AM
I recently got a new 20 GB hard drive to replace the aging 10 Gb I have right now. I was wondering if I should be typing in cp /home /mnt/hd/home/ etc.. or if there was a better way, and would that way copy hidden files?
scinerd
05-03-2003, 11:18 AM
cp is not the suggested way to move any data accross filesystems. With a single file you can get away from it but large groups of files cand cause problems with the data. I would use tar to move the data as root from / with the command
tar -cf - home |(cd /mnt/hd/home && tar -xBpf - )
this will tar to std out then change directory and untar the file to place. This will also keep your permissions. you should be root to do this.
The other option is if you want to copy entire patitions you can use dd. At work I copy untire drive put they tend to be the same size with the command
dd if = /dev/hda of=/dev/hdb
I do this from a cd or third drive that I'm booted off. You can do it with two drive but I would do it from single usermode to get a nice copy.
MighMos
05-03-2003, 12:46 PM
Ok, thanks :-)