Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Copying from one disk drive to another

  1. #1
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Copying from one disk drive to another

    This is the 3rd attempt at copying /home to an external hard disk drive, today.

    I have an external 80 gig usb 2.0 hard drive. I want to copy /home to it. When the 80 gig (marks80 is the icon name and 'folder' name in /media) is powered up, at OS boot time, I get the .dmrc errors. Not a problem, I click OK and dismiss that. Many times I've posted about the .dmrc problem and cannot get the permissions set correctly, so, mostly the 80 gig drive is unpowered except during copying /home.

    I tried gksudo nautilus to copy the /home to the 80gig. No luck finding it as my /home is on it's own partition (sda3).

    At first, opening a Gnome file manager window and copying the /home to the 80 gig balked because of the directory lost+found. So, I drilled down one level to /home/mark (my user name is: mark) and tried to copy that to the 80 gig. At first I got another permission problem about .gvfs and clicked: "skip", and the copying proceeded ok, until the last 2 gig (of 30 gigs total to copy), when another permissions problem reared it's ugly head. The error message read:

    /media/marks80/.config/transmission/gtk

    and the file is: socket

    I'm not good at fixing permisssion, well, I have never got the .dmrc permssions fixed (2+ years), so, I would like to have a way to copy my /home to the external usb drive, without so many problems.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 400Gig SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  2. #2
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    [SOLVED] Copying from one disk drive to another

    This is the 3rd attempt at copying /home to an external hard disk drive, today.

    I have an external 80 gig usb 2.0 hard drive. I want to copy /home to it. When the 80 gig (marks80 is the icon name and 'folder' name in /media) is powered up, at OS boot time, I get the .dmrc errors. Not a problem, I click OK and dismiss that. Many times I've posted about the .dmrc problem and cannot get the permissions set correctly, so, mostly the 80 gig drive is unpowered except during copying /home.

    I tried gksudo nautilus to copy the /home to the 80gig. No luck finding it as my /home is on it's own partition (sda3).

    At first, opening a Gnome file manager window and copying the /home to the 80 gig balked because of the directory lost+found. So, I drilled down one level to /home/mark (my user name is: mark) and tried to copy that to the 80 gig. At first I got another permission problem about .gvfs and clicked: "skip", and the copying proceeded ok, until the last 2 gig (of 30 gigs total to copy), when another permissions problem reared it's ugly head. The error message read:

    /media/marks80/.config/transmission/gtk

    and the file is: socket

    I'm not good at fixing permisssion, well, I have never got the .dmrc permssions fixed (2+ years), so, I would like to have a way to copy my /home to the external usb drive, without so many problems. The file operations icon remains on the panel and never completes it's operation. Force closing it blows up the desktop and I have to reboot.
    Attached Images Attached Images
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 400Gig SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  3. #3
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: Copying from one disk drive to another

    I believe the right way to recursively copy while preserving attributes and permissions is cp -a source destination. Use sudo if necessary. I just backed up and restored a home directory this way and it worked fine.
    Last edited by inportb; November 3rd, 2008 at 09:56 PM. Reason: clarification
    my shiz: http://inportb.com/
    use Dropbox if you need an awesome free file hosting service; please follow my referral link for an extra 256MB of free storage.

  4. #4
    Join Date
    May 2007
    Location
    STL, MO
    Beans
    1,283
    Distro
    Kubuntu Karmic Koala (testing)

    Re: Copying from one disk drive to another

    try it from the command line
    Code:
    sudo cp -R /home/mark /media/folder
    I believe the .dmrc issue can be fixed with this
    Code:
    sudo chmod 644 /home/mark/.dmrc
    you might need to change the location of .dmrc.
    If you are using this for backups, try rsync. I believe this is the command, but others should verify it first.
    Code:
    sudo rsync -zvvr /home/mark/ /media/folder
    then you can run this command each time you want a backup and it will only copy info that has changed, which makes the process very fast.

  5. #5
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: Copying from one disk drive to another

    my shiz: http://inportb.com/
    use Dropbox if you need an awesome free file hosting service; please follow my referral link for an extra 256MB of free storage.

  6. #6
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Copying from one disk drive to another

    Quote Originally Posted by inportb View Post
    The right way to copy while preserving attributes and permissions is cp -a source destination (-ar for recursion). I just backed up and restored a home directory this way and it worked just fine.
    OK, I'm doing this as:

    cp -ar /home /media/marks80

    the disks are spinning. It takes about 30 minutes. For now, I'm marking this thread as solved, but I leave the Ubuntu-Linux community with one question.

    Why is this cp -ar /source /desitination command not a part of some simple to use graphical interface which shows either file copied progress, either as a percentage? (example: 33%) Or as a bar filling up (much to much Microsoft like for my taste, but I'm only 'complaining' not writing code. (I'm an author, not a programmer).

    Thanks community.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 400Gig SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  7. #7
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Copying from one disk drive to another

    Quote Originally Posted by inportb View Post
    Threads merged.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  8. #8
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: Copying from one disk drive to another

    I guess it's because people don't usually make backup archives using the filemanager. Typically, backups are automated.

    I just realized that cp -ar is the same as cp -a, since -a implies -r. Going to edit my post above now =p
    my shiz: http://inportb.com/
    use Dropbox if you need an awesome free file hosting service; please follow my referral link for an extra 256MB of free storage.

  9. #9
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Copying from one disk drive to another

    I can't get this to work. I'm not able to explain what is happening. And I'm frightened for my data (/home of 30gig, and I don't do p2p stuff. It's all my creations or saved stuff).

    Following inportb's command:

    cp -a /source /desination

    I have a copy of /home on my external usb drive.

    Since I'm trying to shrink the size of my / (sda1) (which included /home before it was moved to it's own partition (sda3). I went back to

    gksudo nautilus

    deleted /home with shift-delete.

    Rebooted. Ooooooooppppppppppssssssss!!! Home is gone and now the 80 gig drive won't let me copy it back to where it came from. AND I can't figure out the last part of the command structure. Please recall that 'mark' is my username and group name.

    cp -a /media/marks80/home/mark/home /home

    or should that be:

    cp -a /media/marks80/home/mark/home /home/mark?

    For the moment that doesn't matter as:

    mark@Lexington-19:/media/marks80$ cp -a home /home
    cp: cannot create directory `/home/home': Permission denied

    and

    mark@Lexington-19:/media/marks80$ cp -a home /
    cp: preserving times for `/home/lost+found': Operation not permitted

    although the last one does seem to be copying something, where I do not know.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 400Gig SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  10. #10
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: Copying from one disk drive to another

    Boot up as far as you can and get into a terminal. Then: (assuming you don't have /home on a dedicated partition. in that case, say so and we'll do something else)

    Code:
    sudo -i
    mv /home /home0
    mkdir /home
    cp -a /media/marks80/home/mark /home/
    ... assuming that /media/marks80/home is a copy of your old /home and mark is your username.
    Last edited by inportb; November 3rd, 2008 at 10:58 PM.
    my shiz: http://inportb.com/
    use Dropbox if you need an awesome free file hosting service; please follow my referral link for an extra 256MB of free storage.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •