LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-18-2007, 02:19 PM   #1
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
Copying files from internal Hard drive to USB 2.0 Hard Drive is NOT Behaving


I'm not sure what is going on. I copied my "music" folder (it houses my music collection....imagine that) to my USB Hard drive last week by using Nautilus and play ole "click and drag.". The process went without a hitch. Today, I decided I would copy the same folder over to the USB hard drive, so that I can have a more up-to-date backup on my USB drive. I was greeted with a message that said it would have to overwrite the folder. Since that is what I wanted to do, I click on "overwrite". Nautilus proceeds to update my folder (4500 or so files). Somewhere around 300th file the copy dialog closes without an error message. I go to check and see if the folder is fully updated. The music folder is there, but it isn't updated. After several more failed attempts, I simply deleted the music folder from the USB drive and dragged the source folder from my internal hard drive. It was time consuming, but.....It worked!

I guess my question is, how should I save an updated version of the music folder on my USB drive? Is there a USB syncing program that you would recommend?

**EDIT**
BTW, I checked the read/write permissions and every user had full read/write/execute access.

Last edited by tubatodd; 02-18-2007 at 02:21 PM.
 
Old 02-18-2007, 11:51 PM   #2
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
I've had similar problems with USB hard drives before - I think it was a kernel error. Open terminal after the copy dies, and run this:
Code:
dmesg | tail
A MUCH quicker method, which is what I use to reguarly backup my 30 - 40gb home folder to USB hard drive is 'rsync'. My backup's take less than a minute generally

'rsync' only transfers new and changed files. I just do it from the terminal:
Code:
rsync -av --delete-after /path/to/folder /mnt/usb-harddrive
The '-av' flag tells rsync to transfer the files (a) and list all the files as it goes (v). The '--delete-after' flag tells it to delete any files that are on the USB drive, but no longer on the hard drive.
 
Old 02-19-2007, 12:48 AM   #3
kodalisrikanth
LQ Newbie
 
Registered: May 2006
Location: india
Distribution: Ubuntu,opensuse
Posts: 3

Rep: Reputation: 0
I think u r USB have some fragments....;First check for that by
Quote:
dmesg | tail
it is better if u post the output of that then it is very easy to identify the problem...

Then mount the USB drive by doing
Quote:
mount /path/of/source /path/of/destination
If u have the fragnments then perform defragmentation by doing
Quote:
fsck /path/to/ur/mountpoint
then it shows no.of nodes in that thumbdrive and no.of available nodes.The helth of the disk is estimated by the no.of nodes.If the nodes are equal to the available nodes then there is no fragments.If not there is a chance of fragmentation.

Then it asks the permission to defragment the drive.u just press 'y'.mail me if u have any problems regarding this session.

Last edited by kodalisrikanth; 02-19-2007 at 12:58 AM.
 
Old 02-19-2007, 09:35 AM   #4
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Original Poster
Rep: Reputation: 30
Thank you for your help. I will try the rsync command as that is truly what I want my machine to do. Thanks!

*** EDIT ***

I decided to make a shell script I called "usb_backup.sh" Here it is...
Code:
#!/bin/bash
#
# This little script will backup my "home" folder to my USB Hard drive
rsync -av --delete-after /home/tubatodd/ /media/Aluratek/
I created a launcher in Gnome for it. So, at anytime I can backup my home folder with a click. Thanks again for your help!!!

Last edited by tubatodd; 02-19-2007 at 12:29 PM.
 
Old 02-19-2007, 04:32 PM   #5
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

Rep: Reputation: 34
Nice

Now you can make it automatically mount and unmount the USB drive, redirect the output to a log file, e-mail errors to you and then schedule it :P

Glad that's useful to you,
~p
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
Needing help copying large hard drive to smaller drive sdubble Linux - Software 1 02-21-2006 12:06 PM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Backing up files with a USB Extrenal hard drive linuxmarine Red Hat 13 05-26-2005 08:33 PM
Odd behaviour when copying files from cdrom to hard drive... pdmackenzie Linux - Hardware 9 03-21-2003 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:31 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