Rsync Backup Notification


Recommended Posts

I am trying to setup a script that gives me a notification, for each action, after several rsync backup commands are executed.

 

The commands I am using are like:

 

# Sincronización de la carpeta Fotos
rsync -avh "/mnt/user/Fotos" "/mnt/remotes/192.168.X.X_Backups_Unraid/Backup_UnRaid"
  if [[ $? -eq 0 ]]; then
    /usr/local/emhttp/webGui/scripts/notify -i normal -s "Operation complete" -d "Carpeta Fotos Sincronizada"
  else
    /usr/local/emhttp/webGui/scripts/notify -i warning -s "Operation failed" -d "Error. Carpeta Fotos no Sincronizada"
  fi

# Sincronización de la carpeta Andrea
rsync -avh "/mnt/user/Andrea" "/mnt/remotes/192.168.X.X_Backups_Unraid/Backup_UnRaid"
if [[ $? -eq 0 ]]; then
  /usr/local/emhttp/webGui/scripts/notify -i normal -s "Operation complete" -d "Carpeta Andrea Sincronizada"
else
  /usr/local/emhttp/webGui/scripts/notify -i warning -s "Operation failed" -d "Error. Carpeta Andrea no Sincronizada"
fi

 

The problem is that when running the scrip, it only executes the first loop, and then "stays hung" (namely, it does not run none of the other commands nor shows done button).

 

If I execut the command 

/usr/local/emhttp/webGui/scripts/notify -i normal -s "Operation complete" -d "Carpeta Fotos Sincronizada"

from terminal, the message succesfully apears but the action never finish ("#" does not appear and I can not exit from the command)

 

Can someone help me with it?

 

Thank you

Edited by dellorianes
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.