LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-11-2011, 11:32 PM   #1
thangappan
Member
 
Registered: May 2009
Posts: 52

Rep: Reputation: 16
Post operation in rsync


Dear All,

Is there a way to do any specific operation or executing command after copying the file from source to destination using Rsync?

Thanks in advance.
 
Old 02-11-2011, 11:51 PM   #2
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Question

Quote:
Originally Posted by thangappan View Post
Is there a way to do any specific operation or executing command after copying the file from source to destination using Rsync?
Sorry, I've read your question several times and I can't understand what you mean. I think you should rephrase your question a little more carefully, make it more clear.

Perhaps you mean this:

Code:
$ rsync -whatever -operation && some other command
For example:

Code:
$ cp /etc/fstab ~/fstab-original && echo "backup copy of fstab done successfully"
I don't know, I am just guessing because I find your question confusing.
 
Old 02-12-2011, 12:48 AM   #3
thangappan
Member
 
Registered: May 2009
Posts: 52

Original Poster
Rep: Reputation: 16
Thumbs down

What I meant for is that, using rsync two directories(difference host) are synchronized properly.
In detail, The file which is newly created in the source directory will be copied to destination if I run the rsync command.

In this case this is only one file, in future it might be more than one. So after copying every file to destination execute some system command.

I think, the requirement has been put on very clearly.
 
Old 02-12-2011, 07:41 AM   #4
wetech3
LQ Newbie
 
Registered: Feb 2011
Posts: 7

Rep: Reputation: 1
I think you need to get the details,number or size of files, folders copied in each rsync, for this you can automate this task and put some cron entries to count the details in each rsync.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to complete install 'libvirt.libvirtError POST operation failed: dasearl Linux - Virtualization and Cloud 1 01-19-2011 10:23 PM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 09:48 AM
rsync: how to copy file, "Operation not permitted" nugroho2 Linux - Laptop and Netbook 3 04-21-2010 07:57 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration