Results 1 to 4 of 4

Thread: Need help correcting this rsync command for moving files to new Home dir

  1. #1
    Join Date
    Sep 2011
    Beans
    180
    Distro
    Ubuntu

    Question Need help correcting this rsync command for moving files to new Home dir

    UPDATE 4/14/12 7:02PM: found out the issue, but I don't know how to get the right clearance to allow it to copy to the Home folder directly

    Here's the new command:
    Code:
    rsync --progress -r /media/ALEXPOULOS/backup/alex/ ~ /home/
    and here's the output:
    Code:
    rsync: recv_generator: mkdir "/home/Music" failed: Permission denied (13)
    *** Skipping any contents from this failed directory ***
    ----------------------------------------------------------------------------
    Original Post:

    I recently had an issue with my previous User account - something went wrong and messed up metacity

    So, through trouble shooting I've found out that making a new user account - the problem is non-existent in the new account only the old one.

    TL;DR

    - I'm trying to make an rsync command that copies my Home folder to the new one - I backed up my old one to an external drive and am copying from there.

    Here's what I have:
    Code:
    rsync --progress -r /media/ALEXPOULOS/backup/alex/ ~ /home/alex
    I let it run for a while and then I realized not only did it back up everything from the my old BUT also made a dupe folder inside the /home/alex dir also called "alex" which contained all the same files and in turn caused my Hard drive's free space to go from 160GB - 1.5GB

    So where did I go wrong in this command to have it create a dupe folder?
    Last edited by AlexOnVinyl; April 15th, 2012 at 03:04 AM. Reason: updated command

  2. #2
    Join Date
    Aug 2011
    Beans
    343
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Need help correcting this rsync command for moving files to new Home dir

    First, check the ownership and permissions of the directory and/or files, both source and destination, and see if you can determine the problem. If not, try running rsync with sudo (sudo rsync . . . . .). That should copy everything. Then change the owners, groups and permissions as necessary.

  3. #3
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,651
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Need help correcting this rsync command for moving files to new Home dir

    Hi AlexOnVinyl.

    A few pointers:

    (1) The characther ~ represents your home directory. By itself is replaced by the path to your home directory. For example:
    Code:
    echo ~
    should print
    Code:
    /home/alex
    (2) Since there's a space between ~ and /home/alex in your command:
    Code:
    ...  ~  /home/alex
          ^
    The /media/.. directory and ~ (your home) are considered sources, thus they bith will be copied on the destination: /home/alex

    With all those consideration, try this command:
    Code:
    rsync --progress -r /media/ALEXPOULOS/backup/alex/  /home/alex
    Hope that helps, and tell us how it goes.
    Regards.

  4. #4
    Join Date
    Sep 2011
    Beans
    180
    Distro
    Ubuntu

    Re: Need help correcting this rsync command for moving files to new Home dir

    Solved. Thank you.

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
  •