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

Thread: rsync recursive

  1. #1

    Default rsync recursive

    Using OpenSuse V13.2

    I'm trying to copy all the mp3s, under a directory, onto a thumbdrive, and replicating the directory structure on the thumbdrive, by using the following command

    Code:
     rsync --recursive --checksum --verbose  --progress --stats  --log-file=/home/john/Eight_Copy_Log.txt    /home/john/___John/All/*.mp3     /var/run/media/john/F009-64A5
    rsync doesn't recurse into the subdirectories when *.mp3 is present.


    Without the *.mp3, everything gets copied.

    I've tried many permutations with include file, exclude file with no luck.

    I must be overlooking something.

    Thank you.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,134

    Default Re: rsync recursive

    I am not that fluent with rsync, but my guess is that you forgot that your line is first handled by the shell (bash). This will expand the *.mp3 and the * will never be seen by rsync (let alone worked on).

    Check this by replacing rsync with echo
    Code:
    echo --recursive --checksum --verbose  --progress --stats  --log-file=/home/john/Eight_Copy_Log.txt    /home/john/___John/All/*.mp3     /var/run/media/john/F009-64A5
    This will show you what arguments the rsync program gets offered.
    Henk van Velden

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,743

    Default Re: rsync recursive

    Might want to try a luckybackup it has a nice GUI interface

  4. #4

    Default Re: rsync recursive

    On 10/09/2015 08:26 AM, gogalthorp wrote:
    >
    > Might want to try a luckybackup it has a nice GUI interface
    >
    >


    Both wrong!!!!

    To have rsync copy files/directories recursively you must use a trailing
    / in the source and destination.

    Example:

    Code:

    ------------------------
    rsync <options go here> /some-source-directory /destination
    -------------------------

    will only copy the files from the source directory (NO recursive copy).
    (man rsync)

    Where as:

    Code:

    -----------------
    rsync <options> /some-source-directory/ /destination/
    -----------------

    will copy all files and directories from the source directory.

    If you have no/little experience with rsync (or any program) it's better
    to offer nothing then to give wrong information.

    Hope this helps the OP to better understand rsync.

    Ken
    linux since 1994
    S.U.s.E./openSUSE since 1996

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,743

    Default Re: rsync recursive

    You have a problem with luckybackup. It is simply a GUI front end to rsync and thus much easier to deal with

  6. #6

    Default Re: rsync recursive

    On 10/09/2015 01:06 PM, gogalthorp wrote:
    >
    > You have a problem with luckybackup. It is simply a GUI front end to
    > rsync and thus much easier to deal with
    >
    >

    I have no problems with luckybackup and did not imply that I did. One
    nice thing about linux, there are many ways to skin the cat. The OP was
    referring to CLI use so luckybackup has no bearing to his question.
    I have never used luckybackup so I cannot give advice with it's use.
    Can it be used in a batch mode via cron? No, then CLI is better. It's
    all a matter of preference.

    Ken :-)

    linux since 1994
    S.U.s.E./openSUSE since 1998

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,134

    Default Re: rsync recursive

    The OP wanted to backup only files with names ending in .mp3. The solution that you offered above does not provide that IMHO.
    Henk van Velden

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,743

    Default Re: rsync recursive

    Luckybackup will generate the line for him and he can still use it in a script or run LB to periodically do the backup. Because LB allow you to save the actual line created

  9. #9

    Default Re: rsync recursive

    On 10/09/2015 07:06 AM, DoraPatterson wrote:
    > Code:
    > --------------------
    > rsync --recursive --checksum --verbose --progress --stats --log-file=/home/john/Eight_Copy_Log.txt /home/john/___John/All/*.mp3 /var/run/media/john/F009-64A5
    > --------------------


    Modify the above to:

    Code:
    --------------------
    rsync --include=*.mp3 --checksum --verbose --progress --stats
    --log-file=/home/john/Eight_Copy_Log.txt /home/john/___John/All/
    /var/run/media/john/F009-64A5/
    --------------------

    and let us know how that worked. I forgot you only wanted certain files
    copied in my earlier post.

    HTH

    Ken
    linux since 1994
    S.U.s.E./openSUSE since 1996

  10. #10

    Default Re: rsync recursive

    On 10/09/2015 04:06 PM, gogalthorp wrote:
    >
    > Luckybackup will generate the line for him and he can still use it in a
    > script or run LB to periodically do the backup. Because LB allow you to
    > save the actual line created
    >
    >


    That's good to know. I wish all GUI programs would show what the CLI
    command would be.

    Ken
    linux since 1994
    SuSE/openSuSE since 1996

Page 1 of 2 12 LastLast

Posting Permissions

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