-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
195 lines (137 loc) · 5.96 KB
/
Copy pathREADME
File metadata and controls
195 lines (137 loc) · 5.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Fork of csync2 Notes
====================
This has been my fork of csync2, which until haven't been public.
I have been using csync2 for many years to sync my cluster of tiny linux machines
(geographical distributed), as well as between macs.
While distributed / cluster file systems is of great interest;
I have tried both GlusterFS and Ceph; I prefer the loosly coupled
of csync2, and I can live with manual fixing replication problem once in a while
I did my first patches for csync2 in 2010, and suggested some ideas around
furture development without getting any feedback I decided to continue on my own.
Difference from LINBIT are many. Many code cleanups, but also new features:
- Attempting to track FS operations correct to eliminate redundant operations,
- Extended with a MOVE operation. Detect it locally and perform it on peers
- Supporting hardlinks (with bugs)
- Implement a Storage layer so it could be extended with NoSQL storages
- SQL Layer that implements SQL common between SQL "drivers"
- Much fewer global variables that prevented multiple instance of connections
and threading
- Added tests to ensure functionality when refactoring
- tail file method on inotify generated file to do FS changes without scan
- Begining of a "sync" tool that would fix inconsistencies
Broken stuff
============
- Database format has change. Now stored un-encoded. Only url encoded over wire
- Wire protocol: Minimal but minor things has changed. Dont use with older versions
- Windows support via CYGWIN has not been maintained and is for sure broken.
- Database creating is not 100% correct.
- sqlite 2/3 has not been tested for a long time. Mostly mysql, and some PostgreSQL
Building on macOS:
==================
The build system now automatically detects and handles macOS-specific issues.
Quick Setup (Recommended):
--------------------------
1. Run the macOS setup script:
./setup-macos.sh
2. Source the environment:
source setup-env.sh
3. Build normally:
./autogen.sh
./configure
make
Manual Setup:
-------------
If you prefer manual setup, install dependencies via Homebrew:
brew install autoconf automake libtool bison flex pkg-config
brew install librsync gnutls openssl sqlite mysql-client postgresql
Then set up your environment to use Homebrew's bison (not the system one):
export PATH="/opt/homebrew/opt/bison/bin:$PATH" # Apple Silicon
export PATH="/usr/local/opt/bison/bin:$PATH" # Intel
The configure script will automatically detect bison capabilities and set
appropriate flags. No manual YACC setting is required anymore.
Future
======
- Implement inotity daemon
cheers
:-Dennis Schafroth
==========================================================================
ORIGINAL README (from last public 2.0-rc2)
==============
About csync2
============
Csync2 is a cluster synchronization tool. It can be used to keep files on
multiple hosts in a cluster in sync. Csync2 can handle complex setups with
much more than just 2 hosts, handle file deletions and can detect conflicts.
It is expedient for HA-clusters, HPC-clusters, COWs and server farms. If
you are looking for a tool to sync your laptop with your workstation, you
better have a look at Unison (http://www.cis.upenn.edu/~bcpierce/unison/)
too.
See http://oss.linbit.com/ for more information on csync2. The csync2
subversion tree can be found at http://svn.linbit.com/csync2/.
Copyright
=========
csync2 - cluster synchronization tool, 2nd generation
LINBIT Information Technologies GmbH <http://www.linbit.com>
Copyright (C) 2004, 2005 Clifford Wolf <clifford@clifford.at>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Documentation
=============
The latest version of the csync2 documentation can be found online at
http://www.clifford.at/papers/2005/csync2/paper.pdf
and is mirrored at
http://oss.linbit.com/csync2/paper.pdf
You should definitely read the documentation before trying to setup csync2.
The TeX source of the paper (as well as some slides for csync2 presentations)
can be found at <http://www.clifford.at/papers/2005/csync2/>.
The csync2 releases also have a copy of the 'paper.pdf' file bundled in the
csync2 source tarball.
More Documentation
==================
Eric Liang wrote a nice step-by-step introductions for using csync2 on redhat
machines:
http://zhenhuiliang.blogspot.com/2006/04/csync2-is-so-cool.html
Mailing List
============
There is a csync2 mailing list:
http://lists.linbit.com/mailman/listinfo/csync2
It is recommended to subscribe to this list if you are using csync2 in
production environments.
Building csync2
===============
You'll need the GNU autotools and a C++ compiler toolchain (gcc/g++ or clang++)
for building csync2. This version has been migrated to C++17.
Dependencies:
- C++17 compatible compiler (GCC 7+, Clang 5+, or newer)
- GNU autotools (autoconf, automake, libtool)
- Bison 3.0+ (for -W option support, older versions work but with warnings)
- Flex
- pkg-config
Linux/General Build:
-------------------
First, run the autogen.sh script:
$ ./autogen.sh
Then run configure, use ./configure --help for more options:
$ ./configure
Then run make:
$ make
macOS Build:
-----------
For macOS, use the provided setup script for easier dependency management:
$ ./setup-macos.sh
$ source setup-env.sh
$ ./autogen.sh
$ ./configure
$ make
csync2 should be built now. Direct any questions to the csync2 mailing list
(see above).
- Johannes