CSYNC2(1)

πŸ“¦
version 2.0+git.1600444747.83b3644 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– 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]...

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 down csync2 but allows multiple csync2 processes 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 -ii bind to a specific interface. You can pass either a hostname or ip address. If used, this value must match exactly the host value in each csync2.cfg file. 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 -TI run.
  • -U β€” don't mark all other peers as dirty when doing a -TI run.
  • -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 says peer1,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 -c run). 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 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

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 πŸ’–βœ¨πŸŽ€