How to log RSYNC succes/failure in my shell file & send email notification

I have a shell file rsyncCommand.sh with code as below which generates RsyncLog.txt file. I want to add a column success/failure and check whether rsync was a success or a failure. In addition , want o send an email notification in case it was a failure.
#!/bin/bash
fileCreationPath="/u01/Oracle/SyncScriptFolder"
destination="abc@boseastlnt4"
destinationPath="/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs"
sourcePath="/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs"
startdate=$(date +"%m-%d-%Y %r")
starttime=$(date +"%m-%d-%Y %r")
touch $fileCreationPath/lock.file
chmod 777 $fileCreationPath/lock.file
eval "find $fileCreationPath/RsyncLog.txt"
status=$?
if [ "$status" == "0" ];
then
echo "RsyncLog.txt File Exists "
else
touch $fileCreationPath/RsyncLog.txt
          echo -e "StartDate \t\t FolderName     \t\t StartTime \t\t EndTime" >>/$fileCreationPath/RsyncLog.txt
fi
rsync -e ssh -avzr --delete $sourcePath/weblayout/ $destination:$destinationPath/weblayout/
echo -e "$startdate\t\t weblayout\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/vault/ $destination:$destinationPath/vault/
echo -e "$startdate\t\t vault \t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/data/ $destination:$destinationPath/data/
echo -e "$startdate\t\t data \t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/custom/ $destination:$destinationPath/custom/
echo -e "$startdate\t\t custom\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/classes $destination:$destinationPath/classes/
echo -e "$startdate\t\t classes\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
rm $fileCreationPath/lock.file
"

How can i get the status (Success/Failure?

Similar Messages

  • How do I fix the failure to read Pdf files?

    How do I fix the failure to read Pdf files(Many old and some new) with new acro reader 11?

    What is your operating system?  What exactly do you mean "failure to read"; do you get an error message?

  • ICal keeps sending email notifications from all agenda items from the last 2 years. After laptop start up this action is repeated every hour. How can I stop these 300 emails coming in every hour?

    iCal keeps sending email notifications of all agenda items from the last 2 years (then I bought my laptop). After laptop start up this action is repeated every hour. How can I stop these >300 emails coming in every hour?

    Hi,
    We have rolled out a fix for this issue.
    Please log off and log back in to your machine and the issue should be resolved automatically. In case that does not work, please manually run the msi installer posted here (may require reboot).
    For details, please refer to the KB article here: Multiple RunOnce keys created 11.0.10 and 10.1.13 Acrobat | Reader
    Please let us know if you still face any issues.
    Thanks,
    Ashu Mittal

  • How to send email notification in different languages in Workflow ?? Urgent Help Needed

    Gurus,
    How to send email notification in different languages in Workflow? Can anyone send me some useful guidelines or link where it is mentioned.

    There is no profile option available to specify whether send or not send email notification.
    But after login, in preferences youcan set the notification preference value by which you can configure whether to send or not
    to send email notifications.
    If you select ''Do not send me mail' or 'Disabled' it will not send.
    For other values it sends the notfication in different formats like text, html, attachments etc...
    Edited by: sarojak on Jun 27, 2011 7:18 AM

  • How can I reduce the size of a pdf file for emailing?

    I want to send a pdf file which is 8 mb, it has bounced in an email because it is too big, how can I reduce the size of the pdf file for emailing?

    Sometimes a simple "Save As" will reduce the file size slightly, but probably not enough to pass the <8 mb threshold of your recipient, as you need.
    You've probably seen it, try the next option in the Save As menu, "Reduced Size PDF," and make it compatible with the latest version possible, again considering the recipient. This suggestion assumes Acrobat X. You don't say which version you're using, but this tool was available at least going back to Version 8, but in a different place, you'll have to hunt.
    If all that doesn't work, you could remove some images from the source document, which also will reduce the overall size.
    Best luck.

  • How do you make icalendar send email notifications?

    Since I "upgraded" my Mac OS I can't figure out how to get calendar to send email notifications. Is this feature gone, now?

    Apple seems to be losing its way since Jobs died. They continue with their efforts to hide features, not document features, and make their products slower and harder to use. I hate the new iPhone OS. I think Apple must hate older people because they keep switching to fonts that are harder to read (e.g. light red on white with thinner font for the calendar app).

  • Failure to use Wallet to Send Emails

    Hello,
    I use Oracle 11.2.0.3 SOE, APEX 4.2.2 ... Listener 2.0.3 with Glassfish 3.0.2.
    I am trying to use Gmail to send emails from APEX instance:
    Host: smtp.gmail.com
    Port: 465
    Use SSL/TLS : Yes
    Wallet Path: file:C:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Administrator
    Wallet Auto login is enabled .
    I got the certificate from this website:
    https://www.geotrust.com/resources/root-certificates/index.html
    But in the Mail queue, I get this error:
    ORA-28759: failure to open file.
    So, how can I use Gmail to send emails from APEX ??
    Regards,

    Maybe this could help:
    https://blogs.oracle.com/oracleworkflow/entry/using_gmail_smtp_and_imap
    Thank you,
    Tony Miller
    LuvMuffin Software

  • How do I use my iPhone's hot spot to send email with Mail ?

    Hi,
    My land line is dead ... so no phone nor internet at home.  But I can use my iPhone'hot spot to get on the web from my iMac.  Great ... it works !
    Oups !   I cannot send email from my computer using my iPhone's hot spot with Mail.
    How do I do that ?
    Regards.
    Robert Lespérance

    Hi Templeton Peck,
    Thanks for droping in my thread ...
    Doesn't the fact that I can surf the web with my iPhone's hot spot and that I cannot use Mail normally has I normally do give you a clue what the problem could be ?
    What other information can I give you other than normally I can surf and send email with my regular ISP.  Now that my ISP is dead I am using my iPhone's hotspot to surf the web awaiting that my ISP's connoection returns. Surfing is OK but I cannot send emails with through Mail.
    When I want to send an email from my computer, I get a message asking me to select the the SMTP server.  Then I select my usual ISP server, but the message comes back telling me it does not work.
    Is there any other configuration to do ?

  • How to send email notifications to customers?

    Hi All,
    We have a requirement to send 'Order Acknowledgement' email notification to customers when their order is booked.
    My question is how do you set up the workflow to pick up the email address of the customer.
    Any help is appreciated!
    Thanks

    Hi
    we have already defined workflow for each order type
    u Can customize workflow after booking add notification,after booking order it will automatically send notification
    create role for email address of customer and give that role name in notification
    Thank you

  • How does workflow retrieve users under an org. unit when sending email

    Dear All:
    Workflow supports sending email activity where you can specify the receipt type and receipt ID. For example, the email is supposed to send to the users within an organizational unit.
    I am just wondering how SAP workflow determines the users within an organizational unit? Does it use HR-ORG evaluation path to get objects under an org. unit?
    Many Thanks in advance!
    Haifeng

    Hi,
    For example, the email is supposed to send to the users
    within an organizational unit.
    Yes workflow template and standard task are also part of organizational unit. As you mentioned that the if the recipient type is choosen as Organizational Object then the workflow system will try to fetch the data from the organizational unit based on the recipient ID you provided in the mail step let say if you are using the recipient id as position Id then workflow system will try to get the data from the organizational unit
    Org object types supported by the workflow system are US, C, S, O....
    If at all the you choose the workflow recipient type as email address which can be a external address then in that case it just simply makes use of BCS communication methods and and in this case your SCOT settings must be configured properly.
    The difference between the first and second  is, in the first case the work items or mails/documents will be sent to sap inbox (SBWP) in the second case it depends on the mail ID you mention for example a outlook mail ID.
    Regards
    Pavan

  • How do I send email notifications to a different email address?

    I created a form in Forms Central, but I need the notifications and receipts to be sent to and from a different email address other than what I used to create my adobe account. How do I accomplish this?

    How do I send cards, calendars etc created in Iphoto to an overseas address, I can't see the option to change to another country.
    You have to order the cards from the Print Products Store in the country of the delivery address. The store is selected in the iPhoto Preferences:
    If a country does not appear in this menu, it does not yet have an Apple Print Products store and you cannot ship an order there.
    To be able to order from a Store in a different country, you have to use an Apple ID, that has a billing address in that county, with a credit card, that is valid in that country.
    See this support document:   Apple Print Products - Apple Store (U.S.)

  • How do I prevent calendar from sending email notifications for calendar events?

    Right now I have my google calendar synced with iCloud.  This is great for me to add things either on my Mac, through the web on iCloud or Google Calendar, or my iphone.  The problem is that I am getting notifications through email that I do not want.  These are not google notifcations but those sent out through my MacBook Pro calendar/mail applications.  How can I stop this from happening?  I want to keep the phone notifications because that's what I need.  The emails just take more of my time up since I need to delete them. 

    Figured it out - in System Prefernces, under "Users & Groups", you can remove individual "Login Items"

  • How can I setup auto bcc function based on the sender email address or name in iplant 5.1 and netscape 4.15 sp7 ?

    I am using netscape 4.15 sp7 on linux and iplanet 5.1 on solaris 8 .. I want to setup a filter or something in the server so that when users sent out email. the server will automatically bcc one copy to one particlar account.

    I have a similar request to do bcc mail forwarding on Sun Java System Messaging Server 6.3-6.03 . Is it possible to provide step by step process of how to get the customized channel setup to bcc all mail traffic?
    Thanks

  • How do I reduce the size of a PDF file for emailing?

    I have scanned a document on my Canon Printer.  The size is very large about 14 Megabytes.  I do not know how to reduce the size so that I can send it via Mail.  I have searched HELP but have not as yet found an answer.  One suggestion was that in my Mail window there is an option to reduce the size of the attachment but I see no such option in my email. 

    Another option for sending large files is to use :
    http://www.filedropper.com/
    You upload the files to the website and it creates
    a URL that you can copy and paste into an email
    which you send to the recipient and they use the
    generated link to get the file.

  • How can we find apple password when it can't send email through and will not accept date of birth given before accessing security questions?

    how can we find an apple id password when email links aren't working and date of birth is shown as incorrect when entered prior to reaching the security questions?

    You are out of luck, then. You cannot track it, Apple cannot help you (btw, this is not Apple here.) You can't set up Find My Phone after the iPad is gone.
    Notify the police. Change all your passwords. Buy a new iPad.
    Perhaps your insurance will cover the loss for you, so speak with your insurance agent.

Maybe you are looking for

  • How to install InDesign CS6 from disk on a Windows 8.1 (64-bit) PC when installation fails after the first initialization of installation program, without error message?

    I have a (legally purchased) disc with InDesign CS6 that I want to install on a PC with Windows 8.1 (64-bit). After I've double-clicked the Set-up.exe file on the disc, a box is displayed showing the progress of the initialization of the installation

  • Mail adapter module  UTF-8 to ISO-8859-1 conversion

    Hi! I've a problem with a mail attachment which is generated by an adapter module for the mail adapter. The content type is set to "Application/EDIFACT; charset=iso-8859-1" when I add the attachment, but the mail adapter ignores the charset-setting.

  • Migration from Window to Mac

    Hi all, I'm new to this forum, but not to LR itself. I have used lightroom for several months (not an official version ) on my old windows laptop and I have quite a lot of images on the HDD of this laptop. Last week I bit the bullet and bought myself

  • Battery replacement service request...

    I did not realize I had not changed my email address to the current one I use now. I sent in a request to get the battery on my silver ipod mini replaced THEN changed my email address to my existing account. I can no longer access the old account but

  • Help with Tabs

    Hello, I've never had to modify tabs after creating the pages, and I am having some issues with it. I had to delete the tabs that were created when I created the pages, and I thought re-creating them would be easy. However the tabs do not show when t