10-30-2013
I need to synchronization by rsync
Hi everyone!
I wonder about the rsync. The purpose I just want:
synchronization from server 1 to server 2 by rsync, example:
Node 1: /app/logs/*
Node 2: /app/logs/*
in Node 1 when I used rsync -aru /app/logs/ node2:/app/logs/, then everything will be copied and update to node 2. But, when I remove or delete a file, a directory in node 1, so rsync will not synchronization to node 2. Example:
Node1: /app/logs/test1 sync to node 2:/app/logs/test1 -> okie
Node1: rm -rf /app/logs/test1 , sync to node2. After sync complete, node 2 could not remove or delete the sub-directory test1, this exists in /app/logs.
How do I do?
Thank you for your guide.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all
Is there an easy way to synchronize the time of a Linux server with another server (Linux or Windows). I need to do this on a daily basis so that my clock does is insync.
Is synchronizing with an eternal server hazardous to the security of the box?
Thanks in advance
KS (2 Replies)
Discussion started by: skotapal
2 Replies
2. UNIX for Advanced & Expert Users
I have 2 hosts (server and client), on the client side I mount remote directory (through NFS). How can I synchronize content of 2 directories (one on the client, and one on the server, mounted to the client)? i.e. when client is connected to the server synchronization process is automatically... (5 Replies)
Discussion started by: Hitori
5 Replies
3. AIX
I want to synchronize my AIX 5.3 server with the server NTP windows using the ntpdate commande but there was a difference about 9 hours after synchro. here is my script and the result
# date
Tue Apr 10 18:58:06 CDT 2007
# ntpdate 192.168.10.212
10 Apr 09:58:19 ntpdate: step time server... (5 Replies)
Discussion started by: tovohery
5 Replies
4. UNIX for Dummies Questions & Answers
I am new on UNIX system. I am administrating a server belongs to a small department. It has Debian installed, and used as mail, web server. I am trying to synchronize to a different machine which has Fedora installed. Can anybody tell me how to copy exact image of one server to a different for ... (3 Replies)
Discussion started by: kumarrana
3 Replies
5. UNIX for Dummies Questions & Answers
Can anybody help me on how to do directory synchronization. i have been reading about rsync and filesync but apparently it seems to me that synchronization is from a source directory to a destination directory only. how about if vice versa - wherein i need to synchronize both directories, updating... (3 Replies)
Discussion started by: splakang25
3 Replies
6. Shell Programming and Scripting
I want to do a synchronization from local to ftp.
local:
name modified time
a.txt 10:04
c.txt 10:05
ftp:
b.txt 10:00
c.txt 10:05
final result would be
a.txt copy to ftp
b.txt deleted
c.txt nothing to do
Is there a good way to do so?
Thanks. (3 Replies)
Discussion started by: uativan
3 Replies
7. Shell Programming and Scripting
Dear all,
I am synchronizing some files on 2 hosts.
host2 is a backup server of host1, but can have some more up to date files.
I use on host2:
rsync -auv usrer@host1:/Source_Dir Dest_DirOption -u (update) will copy and replace the newest files from host2 to host1.
Before this is done I... (1 Reply)
Discussion started by: freddie50
1 Replies
8. Shell Programming and Scripting
Hi All,
I need a .sh script which serves the below purpose. It would be of great help.
I am unable to perform the second need of mapping texts within the file and updating only those contents.
For Eg: There is a html file containing link abc.com. This should be replaced with xyz.com link in... (3 Replies)
Discussion started by: Amulya
3 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
it is assumed that the five processes are available according to the graph (cycle is formed of five process). ... (1 Reply)
Discussion started by: mariam40
1 Replies
10. Shell Programming and Scripting
I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location
I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies
LEARN ABOUT DEBIAN
ropkg::rsync::logparser
RoPkg::Rsync::LogParser(3pm) User Contributed Perl Documentation RoPkg::Rsync::LogParser(3pm)
NAME
RoPkg::Rsync::LogParser - a rsync log parser class
SYNOPSIS
#!/usr/bin/perl
use strict;
use warning;
sub main {
my $lp = new RoPkg::Rsync::LogParser( type => 'client' );
$lp->Parse('/tmp/debian-log.txt');
}
main();
Short description
RoPkg::Rsync::LogParser is a class used to parse (for the moment) client side rsync logs. Using this class you can extract the transfered
files, symlinks created, directories, total number of files, transfered bytes, speed of transfer etc. LogParser support list filter trough
probes (used by many projects to verify the mirrors). The primary use of this class is inside Simba, but can be used without problems in
any other project who needs a rsync client log parser.
METHODS
new(hash)
Constructor of the class. When creating a new class instance you must provide the type of log: client or server . For the moment only the
client parsing routines are defined.
Log($raw_log)
Get/Set the raw rsync log. With no parameters, the get behaviour is selected. If a parameter is present (and valid) the method acts as a
Set method.
Probes(@probes_list)
Get/Set the raw probes list. If no parameter is present, the method returns the number of probes defined (0 if none). If a list of probes
is given, the list is added to the existing list of probes.
Parse($filename)
Parse a rsync client log. If no filename is specified, the method parses the log previsiously set with Log() method. Please take extra care
with the filename. If it does not exists, or is not a file a exception will be raised (Param::Wrong and File::Open).
Files()
In scalar context returns the number of transfered files (filtered by probes list). In list context, returns the list of transfered files.
RealFiles()
In scalar context returns the number of transfered files. In list context, returns the list of transfered files.
Deleted()
In scalar context returns the number of deleted files (filtered by probes list). In list context, returns the list of deleted files.
RealDeleted()
In scalar context returns the number of deleted files. In list context, returns the list of deleted files.
Speed()
Returns the speed (as reported by rsync [in bytes/sec]) of the transfer.
Size()
Returns the size of the synced content.
TransfData()
Returns the total number of bytes transfered during the sync session
Symlinks()
In scalar context returns the number of symlinks (filtered by probes list). In list context, returns the list of symlinks.
RealSymlinks()
In scalar context returns the number of symlinks. In list context, returns the list of symlinks.
PREREQUISITES
RoPkg::Utils requires perl 5.008 or later and RoPkg::Exceptions class. From CPAN, you need the Scalar::Util module. At build time
Test::More is required for tests (if you don't plan to use the tests ignore this dependency).
SEE ALSO
RoPkg::Rsync::Node RoPkg::Rsync::ConfFile RoPkg::Exceptions
AUTHOR
Subredu Manuel <diablo@iasi.roedu.net>
LICENSE
Copyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the
same terms as Perl itself. The LICENSE file contains the full text of the license.
perl v5.8.8 2006-06-09 RoPkg::Rsync::LogParser(3pm)