LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-28-2003, 11:51 AM   #1
dakensta
Member
 
Registered: Jun 2003
Location: SEUK
Distribution: Debian & OS X
Posts: 194

Rep: Reputation: 35
Question cp problems


Having just installed a new hard disk, I have been copying the data from the old server it will replace.

I mounted the old hard disk (via nfs using no_root_squash) and used 'cp -rp /mnt_from/* /destination ' (as root) and left it for the night...

To my horror , the next morning I found that many of the files had not been copied although some (in no apparent order) had been.

Copying directories individually seems to be fine and the total amount to copy is about 80 Gig (just 'normal' files and links)

Distro is Debian Woody (all updated) and no error messages were reported.

Any suggestions as to why I should get this behaviour?

I assume there is something I don't know about cp but it is just a little unnerving not to mention time consuming
 
Old 11-28-2003, 12:21 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
It might be a permission problem or could be caused by trying to copy from a running system; it's going to try and copy your /proc files and everything else which could cause problems. If you have the disk space, the easiest solution is to use some partition imaging software like partimage to copy over the entire partition(s) to your new drive. You'll have to have the space to store the images in a separate partition, slave the new hard drive to the old and restore the images to the new drive. Here's a link on linux imaging software:

http://www.desktop-linux.net/backups.htm
 
Old 11-28-2003, 07:25 PM   #3
dakensta
Member
 
Registered: Jun 2003
Location: SEUK
Distribution: Debian & OS X
Posts: 194

Original Poster
Rep: Reputation: 35
It won't include /proc etc, as it is only certain exported directories (a whole partition, in fact) being copied ... I suppose it could be usage but with only 5 users (all logged out) I had hoped not, although you never know who has forgotten to do what.

Thanks for the link into imaging software - it might be useful if I get back on Monday and it still hasn't copied (god, I hope not...) and certainly worth noting for the future.
 
Old 11-28-2003, 07:46 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Try using the cpio command. I did find it best to boot up with a rescue cdrom and run the following steps....

Note: your partition locations may be different

mkdir /mnt/new /mnt/old

mount /dev/hda1 /mnt/old
mount /dev/hdb1 /mnt/new

change to /mnt/old and get to the top. Then run cpio from there...

find . -depth | cpio --pass-through \
--preserve-modification-time \
--make-directories --verbose /mnt/new
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet Adsl Modem Driver Problems And Install Problems... akhilnair Linux - Hardware 12 11-28-2004 08:19 AM
cisco 350 wireless problems and suse x-server problems incognito9 Linux - Wireless Networking 5 10-14-2004 07:53 AM
Problems with OSS while trying to avoid problems in ALSA (scratchy sound) GT_Onizuka Linux - General 1 02-05-2004 11:55 PM
Problems, problems, problems. Lets start with the soundcard Kre8ive Linux - Newbie 5 08-07-2003 01:20 AM
Problems, problems, problems. Lets start with the ES 1868 AudioDrive Kre8ive Linux - Newbie 1 08-06-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration