Skip to content

Instantly share code, notes, and snippets.

@rammanokar
Last active February 21, 2020 04:26

Revisions

  1. rammanokar revised this gist Feb 21, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions rsync_folder_with_retry_sleep.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    #!/usr/bin/env bash
    #usage:
    # rsync_folder_with_retry_sleep.sh /usr/hdp /data/usr/
    #/usr/hdp folder will be synced to /data/usr/hdp

    src=$1
    dest=$2

  2. rammanokar created this gist Feb 21, 2020.
    11 changes: 11 additions & 0 deletions rsync_folder_with_retry_sleep.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/usr/bin/env bash
    src=$1
    dest=$2

    RC=1
    while [[ $RC -ne 0 ]]
    do
    rsync -avzh $src $dest
    RC=$?
    sleep 120
    done