Rsync from remote machine via ssh and sync by uisng find by modified time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Rsync from remote machine via ssh and sync by uisng find by modified time
# 1  
Old 01-06-2016
Rsync from remote machine via ssh and sync by uisng find by modified time

Hi

I have a requirement to rsync from remote to local machine via ssh and sync files that are changed in last n hours.
pgrep to check if no other sync is running

Code:
pgrep -f rsync.*/opt > /dev/null || rsync --bwlimit=10000 -avz --delete root@X.X.X.X:/var/source/ /opt/dest/   >> /home/log 2>&1

Due to limitations on destination machine sync job needs to be run on local machine

Please can some one help me with this

Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Input to while loop in remote machine using ssh

Hello I am writing a script in a local machine, i am using ssh, here i am not able to using back ticks & input file to while loop. here is my script ssh -q server1 a=`ps -ef | grep ccms | awk {print $1}` b=`ps -ef | grep mss | awk {print $1}` # above lines are not working, so i redirected... (12 Replies)
Discussion started by: nanz143
12 Replies

2. Linux

Executing a script in remote machine through ssh

How to execute a script in remote machine through ssh I have a script test.sh which does some backup activity in remote machine. Wanted to keep backup also in remote machine. ssh -l username <remote machine> "commands to be exceuted as ; separted" but how to put the script in the place of... (5 Replies)
Discussion started by: sanvel
5 Replies

3. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

4. Red Hat

Best way to sync time on a Linux machine

I wanted to know which should be the best way to sync time for a linux machine. We have an application server and a database server, both using RHEL 5.8 as the OS. It is important that the time on both these servers match together and also sync with a common time source. As per my knowledge, these... (11 Replies)
Discussion started by: RHCE
11 Replies

5. Shell Programming and Scripting

Cannot create variables via ssh on remote machine

Hello to all Background info: Local machine : Linux, /bin/bash Remote machine (for the user used for ssh) : SunOs, /bin/ksh (so we have different OS, different Shells) My problem : From the local host i execute $ var=bla $ result=$(ssh -q user@remote-machine " > echo \"this is... (12 Replies)
Discussion started by: black_fender
12 Replies

6. UNIX for Dummies Questions & Answers

/dev/tty find last modified time

what can I use to find the last modified time of a /dev/tty ? (4 Replies)
Discussion started by: l flipboi l
4 Replies

7. Shell Programming and Scripting

ssh connection from remote machine in solaris

Hi! I have two solaris 10 machines(say 10.1.1.1,10.1.1.2). i have installed rsync on 10.1.1.2, 10.1.1.1::: Sun Microsystems Inc. SunOS 5.10 Generic January 2005 -bash-3.00$ ssh 10.1.1.2 "echo $PATH" Password:... (4 Replies)
Discussion started by: dddkiran
4 Replies

8. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

9. Red Hat

how to find the red hat servers in time sync

Hi all, Before i'm going to install application on my RHEL servers, I just wanted make sure servers in time sync. How can I find it. Thanks. (1 Reply)
Discussion started by: s_linux
1 Replies

10. Shell Programming and Scripting

executng program on remote machine using ssh

I am trying to search and remove files from a list of servers. I want to find every occurence of this file on each machine and then remove it. If I execute the find command on the remote machine I would like to be able to pipe the output to xargs and remove the file. Does anyone know hat would be... (1 Reply)
Discussion started by: sewood
1 Replies
Login or Register to Ask a Question
GLDELETESYNC(3G)						    OpenGL 3.3							  GLDELETESYNC(3G)

NAME
glDeleteSync - delete a sync object C SPECIFICATION
void glDeleteSync(GLsync sync); PARAMETERS
sync The sync object to be deleted. DESCRIPTION
glDeleteSync deletes the sync object specified by sync. If the fence command corresponding to the specified sync object has completed, or if no glWaitSync() or glClientWaitSync() commands are blocking on sync, the object is deleted immediately. Otherwise, sync is flagged for deletion and will be deleted when it is no longer associated with any fence command and is no longer blocking any glWaitSync() or glClientWaitSync() command. In either case, after glDeleteSync returns, the name sync is invalid and can no longer be used to refer to the sync object. glDeleteSync will silently ignore a sync value of zero. NOTES
glSync is only supported if the GL version is 3.2 or greater, or if the ARB_sync extension is supported. ERRORS
GL_INVALID_VALUE is generated if sync is neither zero or the name of a sync object. SEE ALSO
glFenceSync(), glWaitSync(), glClientWaitSync() COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. OpenGL 3.3 03/08/2011 GLDELETESYNC(3G)