tsynk.1 - synk - synchronize files between hosts
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tsynk.1 (2401B)
---
1 .Dd 2016-09-08
2 .Dt SYNK 1
3 .Os POSIX.1-2008
4 .Sh NAME
5 .Nm synk
6 .Nd synchronize files between multiple hosts
7 .Sh SYNOPSIS
8 .Nm
9 .Op Fl sv
10 .Op Fl f Ar file
11 .Op Fl p Ar port
12 .Op Fl h Ar host
13 .Ar file..
14 .Sh DESCRIPTION
15 .Nm
16 will connect to the given peers, retrieve the sha512 / mtime of
17 .Ar file
18 on each host and, if the hashes differ at some point,
19 .Xr rsync 1
20 the most recent version from the host (master) to all other peers. In
21 case the master is not localhost,
22 .Xr ssh 1
23 will be used to spawn a remote
24 .Xr rsync 1
25 command between the master and each slave (except for localhost as it's not needed).
26 .Pp
27 When
28 .Nm
29 starts up, it reads the peer list from a configuration file, typically
30 .Xr synk.conf 5 ,
31 unless peers are specified on the command line.
32 .Bl -tag -width "-f file"
33 .It Fl s
34 Enable server-mode. This will make
35 .Nm
36 listen for incomming connections on the address given by
37 .Ar host and port .
38 This is used internally by
39 .Nm
40 and should never be called by the user.
41 .It Fl v
42 Increase verbosity. There are two levels of logging, as follow:
43 .Bl -enum -compact
44 .It
45 print out informations about peers and files (VERBOSE)
46 .It
47 detail all actions taken (DEBUG)
48 .El
49 The logging level can be increased by passing the verbose flag (-v) again.
50 Each level includes the messages of the previous ones.
51 .Nm
52 will log informative messages to stderr.
53 .It Fl f Ar file
54 Have
55 .Nm
56 use
57 .Ar file
58 as the configuration file, instead of the default
59 .Pa /etc/synk.conf .
60 .It Fl p Ar port
61 Have the next peer listen on
62 .Ar port
63 for incoming connections, and connect to it via this port as well.
64 .It Fl h Ar host
65 Add
66 .Ar host
67 to the list of peers to synchronize. Using this flag will prevent
68 .Nm
69 from parsing
70 .Xr synk.conf 5 .
71 .Ar file
72 with. Peers are added as they are parsed on the command line, which
73 means that you can have different
74 .Ar host
75 listen on different
76 .Ar port
77 by calling the
78 .Fl p
79 flag before each
80 .Fl f
81 flag (see
82 .Sx EXAMPLES
83 for use cases).
84 .El
85 .Sh FILES
86 .Bl -tag -width "/etc/synk.confXXX" -compact
87 .It Pa /etc/synk.conf
88 default
89 .Nm
90 configuration file
91 .El
92 .Sh EXAMPLES
93 Synchronize a file between all peers listed in
94 .Pa /etc/synk.conf :
95
96 .Dl synk /etc/hosts
97 .Pp
98 Synchronize a file with two peers, using different ports for each:
99
100 .Dl synk -p 1234 -h 172.16.0.100 -p 5678 -h 172.16.0.101 $HOME/.profile
101 .Ed
102 .Sh SEE ALSO
103 .Xr synk.conf 5 ,
104 .Xr rsync 1 ,
105 .Xr ssh 1
106 .Sh AUTHORS
107 .An Willy Goiffon Aq Mt dev@z3bra.org