Find the answer to your Linux question:
Results 1 to 7 of 7
For whatever reason, I can not get rsync to work the way it's supposed to. Every time I run the command(tried it with many different options) it copies EVERY SINGLE ...
  1. #1
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12

    having trouble with rsync

    For whatever reason, I can not get rsync to work the way it's supposed to. Every time I run the command(tried it with many different options) it copies EVERY SINGLE FILE! This takes way too long and uses up too much bandwidth.

    What I'm trying to do is back up my Music folder on my Windows machine to my linux machine (OpenSuse). The problem is, every time I run the command, it copies every single file again, even though none of them have been updated. I have tried it with the -a (archive) option and the -u (update) option.

    Any suggestions on what to do?

    Thanks yall!

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,838
    Are you running rsync from Windows (via rsync.exe, e.g.) or from a samba share within Linux?

    Can you post the exact command you have tried?

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    What atreyu said, and also how are you mounting the Windows directory on Linux?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    The thing is: rsync uses multiple attributes to determine if a file is different on source vs destination.
    Timestamps, file size, permission bits,..

    And as windows and linux have fundamentally different concepts of those attributes,
    this might lead to "all files changed, letīs resync them".

    The man page of rsync can help you in adjusting the relevant attributes.
    You must always face the curtain with a bow.

  5. #5
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    616
    You can also add -z for compression to help save on your bandwidth. Rsync itself spits out an output of all files that are being compared and all that. You should try running rsync with the -n option (or --dry-run). It will tell you what it would have done IF the command actually executed.

    The thing to take note of is when it finishes e.g. from a client.
    Code:
    sent 1132289623 bytes  received 38 bytes  514794.12 bytes/sec
    total size is 1132151330  speedup is 1.00
    So I sent about 1GB of data. My rsync job though maybe quite larger.

    Rsync still has to run a delta algorith (i believe that's what its called) to compare the files, so this can take time as well.

    It looks at not only file size changes, but timestamps as everyone else has said. You can try -I (or --ignore-times), but this may not have the desired effect you are looking for.
    linux user # 503963

  6. #6
    Just Joined! paveway's Avatar
    Join Date
    May 2011
    Location
    South Texas
    Posts
    12
    Thanks for the responses yall.

    First off, when this is all said and done, I would like for my Linux machine to, every night, back up my music folder on my Windows machine. I also use the Linux machine sort of as a local file server, so yes, Samba is installed and in proper working order.

    As for the source and destination, the source is a mounted windows share on the linux machine. I have this share automatically mount upon bootup through fstab. The destination is a directory in home. Now, I do also have my home directory on Linux shared and mounted on windows (for some extra storage space and redundancy).

    The command I am running is basically this:
    Code:
    rsync -va --delete --progress /mnt/my_mounted_windows_folder /home/me/MusicBackup
    I have altered it a little bit (including taking out the -a option) here and there to no avail...

  7. #7
    Linux Guru
    Join Date
    May 2011
    Posts
    1,838
    have u tried the --size-only rsync option? Have you used --verbose to try and get more output?

Posting Permissions

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