CSYNC2(8)
π CSYNC2 π β the csync2 bestie manual, section 8 (User Commands) π¦
okay so like, welcome to the glow-up of the csync2 man page bestie, we're doing this TOGETHER β¨ (it's CSYNC2(8), section 8 of the User Commands manuals, iykyk)
πΈ NAME πΈ
csync2 β cluster synchronization tool, 2nd generation π
β¨ 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 General Public License. See the file COPYING for details. periodt, that's the legal tea β
π¦ DESCRIPTION π¦
This manual page documents briefly the csync2 command. (briefly!! we're keeping it cute and snappy here, the deep lore lives elsewhere π)
A verbose manual can be found in the csync2 source:
https://github.com/LINBIT/csync2/blob/master/doc/csync2.adoc
csync2 is a program for cluster wide file synchronization. literally its whole personality π
π OPTIONS π
π With file parameters:
-h [-r] file..β Add (recursive) hints for check to db π-c [-r] file..β Check files and maybe add to dirty db π-u [-d] [-r] file..β Updates files if listed in dirty db π-o [-r] file..β Create list of files in compare-mode π-f [-r] file..β Force files to win next conflict resolution π-m file..β Mark files in database as dirty π
π Simple mode:
-x [-d] [[-r] file..]β Run checks for all given files and update remote hosts. one-and-done energy, obsessed π«Ά
π 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) β¨-Hβ List all pending hints from status db π-Lβ List all file-entries from status db π-Mβ List all dirty files from status db π§Ό-S myname peernameβ List file-entries from status db for this synchronization pair. it's giving couple goals π-Tβ Test if everything is in sync with all peers. vibe check, but for your whole cluster β-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. the receipts, the receipts!! π§Ύ-Rβ Remove files from database which do not match config entries. bye felicia π-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. keeping the protocol unbothered and unclobbered, as it deserves π
π Exit codes:
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 errors) are expected. that's it, that's the whole range bestie π
β Modifiers:
-rβ Recursive operation over subdirectories π²-dβ Dry-run on all remote update operations π§ͺ-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. slow and steady wins the race fr fr π’-Aβ Open database in asynchronous mode. This will cause data corruption if the operating system crashes or the computer loses power. π¨ not me warning you about the data corruption!! read that again, data corruption, be careful bestie π¨-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. must match EXACTLY, no freestyling π-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. β οΈ read the docs first, I'm so 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. π-P peer1,peer1,...β Only update these peers (still mark all as dirty). Only show files for these peers in-o(compare) mode. π―-Fβ Add new entries to dirty database with force flag set. πͺ-tβ Print timestamps to debug output (e.g. for profiling). β±οΈ-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.\0and all that, iconic π«§
ποΈ 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 _. it's giving β¨glow-upβ¨ but for database names π
π Creating key file:
csync2 -k filename
π Environment variables:
CSYNC2_SYSTEM_DIR
Directory containing csync2.cfg and other csync2 system files. Defaults to /etc.
π Note:
Csync2 will refuse to do anything if this file is found:
$CSYNC2_SYSTEM_DIR/csync2.lock
literally will not do a single thing. locked out. the lock file said no and csync2 said okay periodt π
π 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. yes, hand-edited, artisanally crafted, no cap π¨
and that's the whole page bestie!! π«Ά this lil legend came to you from the csync2 manual, dated October 2017, and yeah the footer says csync2 on one side and CSYNC2(8) on the other β it's giving symmetric, it's giving balanced, it's giving main character manual energy πβ¨ slay, go sync your cluster, mwah π
π¦ where this page comes from
- debian bookworm: csync2 2.0-42-g83b3644-2 Β· GPL-2.0-or-later
- debian trixie: csync2 2.0-42-g83b3644-3 Β· GPL-2.0-or-later
- ubuntu noble: csync2 2.0-42-g83b3644-2build3 Β· GPL-2.0-or-later
- ubuntu questing: csync2 2.0-42-g83b3644-3
- ubuntu resolute: csync2 2.0-42-g83b3644-4 Β· GPL-2.0-or-later
- ubuntu stonking: csync2 2.0-42-g83b3644-6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms