CSYNC2(1)
π csync2(1) β the cluster synchronization tool, 2nd generation π
okay so this is the User Commands manual page for csync2(1), and bestie, if you're here it's because you need to sync files across a cluster and you want the tea β. let's get into it.
π NAME π
csync2 2.0 β cluster synchronization tool, 2nd generation. yes queen, it's the glow-up of csync and she's serving π
β¨ SYNOPSIS β¨
csync2 [-v..] [-C config-name] [-D database-dir] [-N hostname] [-p
port]...
π COPYRIGHT π
csync2 is copyright Β© 2004 - 2017 by LINBIT Information Technologies GmbH
http://www.linbit.com
csync2 is distributed under the GNU public license. See the file COPYING for details. respect the license bestie, it's literally the law π«Ά
π¦ DESCRIPTION π¦
This manual page documents briefly the csync2 command. a verbose manual can be found in the csync2 source, and it's giving full documentation energy:
https://github.com/LINBIT/csync2/blob/master/doc/csync2.adoc
csync2 is a program for cluster wide file synchronization. no cap, that's the whole vibe π«
π OPTIONS π
πΈ With file parameters πΈ
-h [-r] file..β add (recursive) hints for check to db. hint hint, bestie π-c [-r] file..β check files and maybe add to dirty db. she's doing a vibe check on your files π―-u [-d] [-r] file..β updates files if listed in dirty db. glow-up time π-o [-r] file..β create list of files in compare-mode. side-by-side comparison, main character energy π-f [-r] file..β force files to win next conflict resolution. periodt, they win π-m file..β mark files in database as dirty. dirty dirty, but make it database π
πΌ Simple mode πΌ
-x [-d] [[-r] file..]β run checks for all given files and update remote hosts. one and done, slay β¨
π» Without file parameters π»
-cβ check all hints in db and eventually mark files as dirty.-u [-d]β update (transfer dirty files to peers and mark as clear). clean queen π§Ό-Hβ list all pending hints from status db.-Lβ list all file-entries from status db.-Mβ list all dirty files from status db. the messy ones, we see them π-S myname peernameβ list file-entries from status db for this synchronization pair. just the two of them, iconic duo π-Tβ test if everything is in sync with all peers.-T filenameβ test if this file is in sync with all peers.-T myname peernameβ test if this synchronization pair is in sync.-T myname peer fileβ test only this file in this sync pair.-TTβ as-T, but print the unified diffs. show me the receipts π-Rβ remove files from database which do not match config entries. you don't belong here, bye π-iβ run in inetd server mode.-iiβ run in stand-alone server mode.-iiiβ run in stand-alone server mode (one connect only).-lβ send some messages to syslog instead of stderr to not clobber the protocol in case stdout and stderr point to the same fd. Default for inetd mode. protecting the protocol, we love a careful queen π‘οΈ
π Exit codes π
okay so the modes -H, -L, -M and -S return 2 if the requested db is empty. the mode -T returns 2 if both hosts are in sync. otherwise, only exit codes 0 (no errors) and 1 (some unspecified errrors) are expected.
β οΈ yes the original says "errrors" β we don't fix typos in the docs, we respect the heritage π
πΊ Modifiers πΊ
-rβ recursive operation over subdirectories. go deep bestie π³οΈ-dβ dry-run on all remote update operations. rehearsal before the performance π-Bβ do not block everything into big SQL transactions. This slows downcsync2but allows multiplecsync2processes to access the database at the same time. Use e.g. when slow lines are used or huge files are transferred. multitasking queen, she's flexible π§-Aβ open database in asynchronous mode. This will cause data corruption if the operating system crashes or the computer loses power. β‘ no cap, this is dangerous, do NOT come crying to me when your database is a mess π-N addressβ when running in stand-alone mode with-iibind to a specific interface. You can pass either a hostname or ip address. If used, this value must match exactly the host value in eachcsync2.cfgfile. exact match or it's not the vibe π―-Iβ Init-run. Use with care and read the documentation first! You usually do not need this option unless you are initializing groups with really large file lists. use with care bestie, I'm serious π-Xβ also add removals to dirty db when doing a-TIrun.-Uβ don't mark all other peers as dirty when doing a-TIrun.-G Group1,Group2,Group3,...β only use these groups from config-file. selective queen π-P peer1,peer1,...β only update these peers (still mark all as dirty). Only show files for these peers in-o(compare) mode. (yes it sayspeer1,peer1,...twice β iconic, keep it π«Ά)-Fβ add new entries to dirty database with force flag set.-tβ print timestamps to debug output (e.g. for profiling). time-stamped tea β-s filenameβ print timestamps also to this file.-W fdβ write a list of directories in which relevant files can be found to the specified file descriptor (when doing a-crun). The directory names in this output are zero-terminated. zero-terminated, not newline-terminated β iykyk π₯
π Database switches π
-D database-dir or url
default: /var/lib/csync2
Absolute path: use sqlite database in that directory.
URLs:
sqlite:///some/path[/database.db3]
sqlite3:///some/path[/database.db3]
sqlite2:///some/path[/database.db]
mysql://[<user>:<password>@]<hostname>/[database]
pgsql://[<user>:<password>@]<hostname>/[database]
If database is not given, it defaults to csync2_<qualified hostname>
Note that for non-sqlite backends, the database name is "cleaned", characters outside of [0-9][a-z][A-Z] will be replaced with _.
π§ Creating key file π§
csync2 -k filename
β Environment variables β
CSYNC2_SYSTEM_DIRβ directory containingcsync2.cfgand othercsync2system files. Defaults to/etc.
π Note π
Csync2 will refuse to do anything if this file is found:
$CSYNC2_SYSTEM_DIR/csync2.lock
no lock file, no service. she's boundaries queen π«π
π SEE ALSO π
https://github.com/LINBIT/csync2/blob/master/doc/csync2.adoc
http://git.linbit.com/csync2.git/?a=blob;f=AUTHORS
This manual page is a hand-edited help2man processed csync2 help. hand-edited with love, bestie π«Ά
and that's the whole page!! this was csync2 from October 2017, the CSYNC2(1) manual β mwah, slay, go sync those files πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: csync2 2.0+git.1600444747.83b3644-160000.3.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: csync2 2.0+git.1600444747.83b3644-160000.3.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: csync2 2.0+git.1600444747.83b3644-160000.3.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: csync2 2.0+git.1600444747.83b3644-160000.3.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms