Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-22-2013, 01:56 AM   #1
Registered: Feb 2013
Posts: 212

Rep: Reputation: Disabled
rsync usage


we are having five remote locations.In head office all files will move to one directory called /printing . i want to move these files into five remote locations using rsync and if i use rsync -v -e ssh /printing hubli@ it transfers only existing files in printing directory, but our users will move the files every five minutes. so i cant execute every time as mentioned above i want to sync automatically every five minutes.please give me procedure to do this .i have one idea using crontab tool i can do this but is der any other idea by using only rsync tool.please help me out
Old 03-22-2013, 04:36 AM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
I'd use cron, as you suggest. Its simpler than setting up rsync in a daemon; you'd be basically re-creating cron functionality.
Old 03-23-2013, 01:11 AM   #3
Registered: Feb 2013
Posts: 212

Original Poster
Rep: Reputation: Disabled
But i want use rsync only is it possible??
Old 03-23-2013, 08:19 AM   #4
Registered: Jan 2013
Distribution: Debian
Posts: 168

Rep: Reputation: 2
5 * * * * "/usr/bin/rsync -v -e ssh /printing hubli@"

Don't know if you can add the command like that. If you can't, just write a script with that command within it, and in the crontab line write /path/to/
Old 03-23-2013, 11:31 PM   #5
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
yzT! has it. put something like that in cron, that is what it is for. you can set it to run every 5min so the first option in cron would be */5 not just 5 as that will run at the 5min mark every hour so 1:05, 2:05, etc... */5 will run every 5min.

you can shorten that as well to */2 or something silly. do keep in mind that if the total amount of files to be pushed across your WAN/LAN takes longer then2-5min then you will run into errors were cron will crash as rsync will still be running and you can only have 1 instance of rsync running at a time.

so create you and as you have 5 remote servers to receive the data set the script up to rsync to all 5, one at at time, then just call the script once every five minutes in cron.


rsync -aviS /path/to/printing remote_user@remote_IP:/path/to/remote/printing/directory  >> ${LOG}

## do this four more times for each of the remaining remote servers###
then run crontab -e as the user this script will be run under

*/5     *     *     *     *     /path/to/
poof you are fin.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] rsync usage to make one directory look exactly like other rohit.dhaval1 Linux - Software 4 02-10-2012 10:35 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 02:39 AM
rsync memory usage over ssh tajamari Linux - Software 9 09-20-2007 06:52 AM
rsync reduce cpu usage dtra Linux - Software 0 05-25-2005 09:04 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:22 AM.

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