Sponsored Content
Top Forums Shell Programming and Scripting rsync with e-mail notification failure Post 302707051 by indracyd on Friday 28th of September 2012 12:09:01 AM
Old 09-28-2012
rsync with e-mail notification failure

dear all,

i have script rsync like this :
Code:
#!/bin/sh
RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
RUSER=root
RHOST=123.123.123.1
INTRPATH=/home/jargo/log/internasional/
INTHPATH=/var/www/international/
IIXRPATH=/home/jargo/log/iix/
IIXHPATH=/var/www/iix/
TTLRPATH=/home/jargo/log/total/
TTLHPATH=/var/www/total/

$RSYNC -az $INTHPATH --include='*log' --include='*old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$INTRPATH
$RSYNC -az $IIXHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$IIXRPATH
$RSYNC -az $TTLHPATH --include='*log' --include='*.old' --exclude='*' -e "$SSH" $RUSER@$RHOST:$TTLRPATH

i won if rsync failure all or or any of rsync commands are, will be in the email as an email notification errors

Cyd

Last edited by Franklin52; 09-28-2012 at 06:30 AM.. Reason: Please use code tags for data and code samples
 

7 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Mail Notification in nagios

Hi guys, I have configured Nagios in My Ubuntu8.4 machine through Quickstart Guide, All things are working fine. Now i want to get Services Notification mails on my personal Email-id,what configuration is needed to get the mails,any assistance would be appreciable. Thanks in advance. (3 Replies)
Discussion started by: daya.pandit
3 Replies

2. Shell Programming and Scripting

AIX mail notification

plzzz help me, I want to send emails for exchange group members when the used file-system % gets more than 90%, this notification must include df -g, netstat -i,and errpt with the hostname thx in advance (0 Replies)
Discussion started by: majd_ece
0 Replies

3. Shell Programming and Scripting

Restrict the mail upon first failure mail.

Hi, I have a application which send mail to the respective client upon success or failure case of file transfer, upon success there is no problem. But in case of failure that application is running again in cron job,so still success of file transfer the client will get the failure notification.... (5 Replies)
Discussion started by: posix
5 Replies

4. Shell Programming and Scripting

Rsync through java program - issues with remote connection failure

Hi Everybody, I am running rsync through my java application. The Java application will sync the files with remote machine. During our connection failure testing we noticed an issue running rsync through java program. The java application which is running at source side is not receiving any... (2 Replies)
Discussion started by: MVEERA
2 Replies

5. Shell Programming and Scripting

Add Email Notification to Rsync

HI what i need to be able to do is add a email to the end of a rsync. my current ion configures writes a daily log to disk, but real want to send the log to a central email address. The current script is as below, is this possible? #!/bin/bash if then rsync -aWv --stats progress... (3 Replies)
Discussion started by: treds
3 Replies

6. Shell Programming and Scripting

Script for sending notification mail

hi all, needed a script to send a notfication mail if the specified folder had the copy of the files that are older than 15 days i.ee for example my folder name is SAi and the files are as follows sai.txt copyofsai.txt copyofcopyofsai.txt hemanth.txt copyofcopyofhemanth.txt... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

7. SuSE

Notification for audit processing failure

Dear users, I have SLES 11 and SLES 10 servers. I'd like to receive an alert when audit log files reach certain percentage of full. 1. Is '/etc/audit/auditd.conf' the right file to modify? 2. I'd like to receive email alert. Can I specify my email in this parameter ... (0 Replies)
Discussion started by: JDBA
0 Replies
rsync_selinux(8)					rsync Selinux Policy documentation					  rsync_selinux(8)

NAME
rsync_selinux - Security Enhanced Linux Policy for the rsync daemon DESCRIPTION
Security-Enhanced Linux secures the rsync server via flexible mandatory access control. FILE_CONTEXTS SELinux requires files to have an extended attribute to define the file type. Policy governs the access daemons have to these files. If you want to share files using the rsync daemon, you must label the files and directories public_content_t. So if you created a special directory /var/rsync, you would need to label the directory with the chcon tool. chcon -t public_content_t /var/rsync To make this change permanent (survive a relabel), use the semanage command to add the change to file context configuration: semanage fcontext -a -t public_content_t "/var/rsync(/.*)?" This command adds the following entry to /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local: /var/rsync(/.*)? system_u:object_r:publix_content_t:s0 Run the restorecon command to apply the changes: restorecon -R -v /var/rsync/ SHARING FILES
If you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and pub- lic_content_rw_t. These context allow any of the above domains to read the content. If you want a particular domain to write to the pub- lic_content_rw_t domain, you must set the appropriate boolean. allow_DOMAIN_anon_write. So for rsync you would execute: setsebool -P allow_rsync_anon_write=1 BOOLEANS
system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>. SEE ALSO
selinux(8), rsync(1), chcon(1), setsebool(8), semanage(8) dwalsh@redhat.com 17 Jan 2005 rsync_selinux(8)
All times are GMT -4. The time now is 01:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy