Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-18-2007, 02:19 PM
|
#1
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Rep:
|
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.
|
|
|
02-18-2007, 11:51 PM
|
#2
|
Member
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449
Rep:
|
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:
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.
|
|
|
02-19-2007, 12:48 AM
|
#3
|
LQ Newbie
Registered: May 2006
Location: india
Distribution: Ubuntu,opensuse
Posts: 3
Rep:
|
I think u r USB have some fragments....;First check for that by
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.
|
|
|
02-19-2007, 09:35 AM
|
#4
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
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.
|
|
|
02-19-2007, 04:32 PM
|
#5
|
Member
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 01:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|