rsync.1 161 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586
  1. .TH "rsync" "1" "23 Sep 2011" "" ""
  2. .SH "NAME"
  3. rsync \- a fast, versatile, remote (and local) file\-copying tool
  4. .SH "SYNOPSIS"
  5. .PP
  6. .nf
  7. Local: rsync [OPTION...] SRC... [DEST]
  8. Access via remote shell:
  9. Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
  10. Push: rsync [OPTION...] SRC... [USER@]HOST:DEST
  11. Access via rsync daemon:
  12. Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
  13. rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
  14. Push: rsync [OPTION...] SRC... [USER@]HOST::DEST
  15. rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST
  16. .fi
  17. .PP
  18. Usages with just one SRC arg and no DEST arg will list the source files
  19. instead of copying.
  20. .PP
  21. .SH "DESCRIPTION"
  22. .PP
  23. Rsync is a fast and extraordinarily versatile file copying tool. It can
  24. copy locally, to/from another host over any remote shell, or to/from a
  25. remote rsync daemon. It offers a large number of options that control
  26. every aspect of its behavior and permit very flexible specification of the
  27. set of files to be copied. It is famous for its delta\-transfer algorithm,
  28. which reduces the amount of data sent over the network by sending only the
  29. differences between the source files and the existing files in the
  30. destination. Rsync is widely used for backups and mirroring and as an
  31. improved copy command for everyday use.
  32. .PP
  33. Rsync finds files that need to be transferred using a \(dq\&quick check\(dq\&
  34. algorithm (by default) that looks for files that have changed in size or
  35. in last\-modified time. Any changes in the other preserved attributes (as
  36. requested by options) are made on the destination file directly when the
  37. quick check indicates that the file\(cq\&s data does not need to be updated.
  38. .PP
  39. Some of the additional features of rsync are:
  40. .PP
  41. .IP o
  42. support for copying links, devices, owners, groups, and permissions
  43. .IP o
  44. exclude and exclude\-from options similar to GNU tar
  45. .IP o
  46. a CVS exclude mode for ignoring the same files that CVS would ignore
  47. .IP o
  48. can use any transparent remote shell, including ssh or rsh
  49. .IP o
  50. does not require super\-user privileges
  51. .IP o
  52. pipelining of file transfers to minimize latency costs
  53. .IP o
  54. support for anonymous or authenticated rsync daemons (ideal for
  55. mirroring)
  56. .PP
  57. .SH "GENERAL"
  58. .PP
  59. Rsync copies files either to or from a remote host, or locally on the
  60. current host (it does not support copying files between two remote hosts).
  61. .PP
  62. There are two different ways for rsync to contact a remote system: using a
  63. remote\-shell program as the transport (such as ssh or rsh) or contacting an
  64. rsync daemon directly via TCP. The remote\-shell transport is used whenever
  65. the source or destination path contains a single colon (:) separator after
  66. a host specification. Contacting an rsync daemon directly happens when the
  67. source or destination path contains a double colon (::) separator after a
  68. host specification, OR when an rsync:// URL is specified (see also the
  69. \(dq\&USING RSYNC\-DAEMON FEATURES VIA A REMOTE\-SHELL CONNECTION\(dq\& section for
  70. an exception to this latter rule).
  71. .PP
  72. As a special case, if a single source arg is specified without a
  73. destination, the files are listed in an output format similar to \(dq\&ls \-l\(dq\&.
  74. .PP
  75. As expected, if neither the source or destination path specify a remote
  76. host, the copy occurs locally (see also the \fB\-\-list\-only\fP option).
  77. .PP
  78. Rsync refers to the local side as the \(dq\&client\(dq\& and the remote side as the
  79. \(dq\&server\(dq\&. Don\(cq\&t confuse \(dq\&server\(dq\& with an rsync daemon \-\- a daemon is always a
  80. server, but a server can be either a daemon or a remote\-shell spawned process.
  81. .PP
  82. .SH "SETUP"
  83. .PP
  84. See the file README for installation instructions.
  85. .PP
  86. Once installed, you can use rsync to any machine that you can access via
  87. a remote shell (as well as some that you can access using the rsync
  88. daemon\-mode protocol). For remote transfers, a modern rsync uses ssh
  89. for its communications, but it may have been configured to use a
  90. different remote shell by default, such as rsh or remsh.
  91. .PP
  92. You can also specify any remote shell you like, either by using the \fB\-e\fP
  93. command line option, or by setting the RSYNC_RSH environment variable.
  94. .PP
  95. Note that rsync must be installed on both the source and destination
  96. machines.
  97. .PP
  98. .SH "USAGE"
  99. .PP
  100. You use rsync in the same way you use rcp. You must specify a source
  101. and a destination, one of which may be remote.
  102. .PP
  103. Perhaps the best way to explain the syntax is with some examples:
  104. .PP
  105. .RS
  106. \f(CWrsync \-t *.c foo:src/\fP
  107. .RE
  108. .PP
  109. This would transfer all files matching the pattern *.c from the
  110. current directory to the directory src on the machine foo. If any of
  111. the files already exist on the remote system then the rsync
  112. remote\-update protocol is used to update the file by sending only the
  113. differences. See the tech report for details.
  114. .PP
  115. .RS
  116. \f(CWrsync \-avz foo:src/bar /data/tmp\fP
  117. .RE
  118. .PP
  119. This would recursively transfer all files from the directory src/bar on the
  120. machine foo into the /data/tmp/bar directory on the local machine. The
  121. files are transferred in \(dq\&archive\(dq\& mode, which ensures that symbolic
  122. links, devices, attributes, permissions, ownerships, etc. are preserved
  123. in the transfer. Additionally, compression will be used to reduce the
  124. size of data portions of the transfer.
  125. .PP
  126. .RS
  127. \f(CWrsync \-avz foo:src/bar/ /data/tmp\fP
  128. .RE
  129. .PP
  130. A trailing slash on the source changes this behavior to avoid creating an
  131. additional directory level at the destination. You can think of a trailing
  132. / on a source as meaning \(dq\&copy the contents of this directory\(dq\& as opposed
  133. to \(dq\&copy the directory by name\(dq\&, but in both cases the attributes of the
  134. containing directory are transferred to the containing directory on the
  135. destination. In other words, each of the following commands copies the
  136. files in the same way, including their setting of the attributes of
  137. /dest/foo:
  138. .PP
  139. .RS
  140. \f(CWrsync \-av /src/foo /dest\fP
  141. .br
  142. \f(CWrsync \-av /src/foo/ /dest/foo\fP
  143. .br
  144. .RE
  145. .PP
  146. Note also that host and module references don\(cq\&t require a trailing slash to
  147. copy the contents of the default directory. For example, both of these
  148. copy the remote directory\(cq\&s contents into \(dq\&/dest\(dq\&:
  149. .PP
  150. .RS
  151. \f(CWrsync \-av host: /dest\fP
  152. .br
  153. \f(CWrsync \-av host::module /dest\fP
  154. .br
  155. .RE
  156. .PP
  157. You can also use rsync in local\-only mode, where both the source and
  158. destination don\(cq\&t have a \(cq\&:\(cq\& in the name. In this case it behaves like
  159. an improved copy command.
  160. .PP
  161. Finally, you can list all the (listable) modules available from a
  162. particular rsync daemon by leaving off the module name:
  163. .PP
  164. .RS
  165. \f(CWrsync somehost.mydomain.com::\fP
  166. .RE
  167. .PP
  168. See the following section for more details.
  169. .PP
  170. .SH "ADVANCED USAGE"
  171. .PP
  172. The syntax for requesting multiple files from a remote host is done by
  173. specifying additional remote\-host args in the same style as the first,
  174. or with the hostname omitted. For instance, all these work:
  175. .PP
  176. .RS
  177. \f(CWrsync \-av host:file1 :file2 host:file{3,4} /dest/\fP
  178. .br
  179. \f(CWrsync \-av host::modname/file{1,2} host::modname/file3 /dest/\fP
  180. .br
  181. \f(CWrsync \-av host::modname/file1 ::modname/file{3,4}\fP
  182. .RE
  183. .PP
  184. Older versions of rsync required using quoted spaces in the SRC, like these
  185. examples:
  186. .PP
  187. .RS
  188. \f(CWrsync \-av host:'\&dir1/file1 dir2/file2'\& /dest\fP
  189. .br
  190. \f(CWrsync host::'\&modname/dir1/file1 modname/dir2/file2'\& /dest\fP
  191. .RE
  192. .PP
  193. This word\-splitting still works (by default) in the latest rsync, but is
  194. not as easy to use as the first method.
  195. .PP
  196. If you need to transfer a filename that contains whitespace, you can either
  197. specify the \fB\-\-protect\-args\fP (\fB\-s\fP) option, or you\(cq\&ll need to escape
  198. the whitespace in a way that the remote shell will understand. For
  199. instance:
  200. .PP
  201. .RS
  202. \f(CWrsync \-av host:'\&file\e name\e with\e spaces'\& /dest\fP
  203. .RE
  204. .PP
  205. .SH "CONNECTING TO AN RSYNC DAEMON"
  206. .PP
  207. It is also possible to use rsync without a remote shell as the transport.
  208. In this case you will directly connect to a remote rsync daemon, typically
  209. using TCP port 873. (This obviously requires the daemon to be running on
  210. the remote system, so refer to the STARTING AN RSYNC DAEMON TO ACCEPT
  211. CONNECTIONS section below for information on that.)
  212. .PP
  213. Using rsync in this way is the same as using it with a remote shell except
  214. that:
  215. .PP
  216. .IP o
  217. you either use a double colon :: instead of a single colon to
  218. separate the hostname from the path, or you use an rsync:// URL.
  219. .IP o
  220. the first word of the \(dq\&path\(dq\& is actually a module name.
  221. .IP o
  222. the remote daemon may print a message of the day when you
  223. connect.
  224. .IP o
  225. if you specify no path name on the remote daemon then the
  226. list of accessible paths on the daemon will be shown.
  227. .IP o
  228. if you specify no local destination then a listing of the
  229. specified files on the remote daemon is provided.
  230. .IP o
  231. you must not specify the \fB\-\-rsh\fP (\fB\-e\fP) option.
  232. .PP
  233. An example that copies all the files in a remote module named \(dq\&src\(dq\&:
  234. .PP
  235. .nf
  236. rsync \-av host::src /dest
  237. .fi
  238. .PP
  239. Some modules on the remote daemon may require authentication. If so,
  240. you will receive a password prompt when you connect. You can avoid the
  241. password prompt by setting the environment variable RSYNC_PASSWORD to
  242. the password you want to use or using the \fB\-\-password\-file\fP option. This
  243. may be useful when scripting rsync.
  244. .PP
  245. WARNING: On some systems environment variables are visible to all
  246. users. On those systems using \fB\-\-password\-file\fP is recommended.
  247. .PP
  248. You may establish the connection via a web proxy by setting the
  249. environment variable RSYNC_PROXY to a hostname:port pair pointing to
  250. your web proxy. Note that your web proxy\(cq\&s configuration must support
  251. proxy connections to port 873.
  252. .PP
  253. You may also establish a daemon connection using a program as a proxy by
  254. setting the environment variable RSYNC_CONNECT_PROG to the commands you
  255. wish to run in place of making a direct socket connection. The string may
  256. contain the escape \(dq\&%H\(dq\& to represent the hostname specified in the rsync
  257. command (so use \(dq\&%%\(dq\& if you need a single \(dq\&%\(dq\& in your string). For
  258. example:
  259. .PP
  260. .nf
  261. export RSYNC_CONNECT_PROG='\&ssh proxyhost nc %H 873'\&
  262. rsync \-av targethost1::module/src/ /dest/
  263. rsync \-av rsync:://targethost2/module/src/ /dest/
  264. .fi
  265. .PP
  266. The command specified above uses ssh to run nc (netcat) on a proxyhost,
  267. which forwards all data to port 873 (the rsync daemon) on the targethost
  268. (%H).
  269. .PP
  270. .SH "USING RSYNC\-DAEMON FEATURES VIA A REMOTE\-SHELL CONNECTION"
  271. .PP
  272. It is sometimes useful to use various features of an rsync daemon (such as
  273. named modules) without actually allowing any new socket connections into a
  274. system (other than what is already required to allow remote\-shell access).
  275. Rsync supports connecting to a host using a remote shell and then spawning
  276. a single\-use \(dq\&daemon\(dq\& server that expects to read its config file in the
  277. home dir of the remote user. This can be useful if you want to encrypt a
  278. daemon\-style transfer\(cq\&s data, but since the daemon is started up fresh by
  279. the remote user, you may not be able to use features such as chroot or
  280. change the uid used by the daemon. (For another way to encrypt a daemon
  281. transfer, consider using ssh to tunnel a local port to a remote machine and
  282. configure a normal rsync daemon on that remote host to only allow
  283. connections from \(dq\&localhost\(dq\&.)
  284. .PP
  285. From the user\(cq\&s perspective, a daemon transfer via a remote\-shell
  286. connection uses nearly the same command\-line syntax as a normal
  287. rsync\-daemon transfer, with the only exception being that you must
  288. explicitly set the remote shell program on the command\-line with the
  289. \fB\-\-rsh=COMMAND\fP option. (Setting the RSYNC_RSH in the environment
  290. will not turn on this functionality.) For example:
  291. .PP
  292. .nf
  293. rsync \-av \-\-rsh=ssh host::module /dest
  294. .fi
  295. .PP
  296. If you need to specify a different remote\-shell user, keep in mind that the
  297. user@ prefix in front of the host is specifying the rsync\-user value (for a
  298. module that requires user\-based authentication). This means that you must
  299. give the \(cq\&\-l user\(cq\& option to ssh when specifying the remote\-shell, as in
  300. this example that uses the short version of the \fB\-\-rsh\fP option:
  301. .PP
  302. .nf
  303. rsync \-av \-e \(dq\&ssh \-l ssh\-user\(dq\& rsync\-user@host::module /dest
  304. .fi
  305. .PP
  306. The \(dq\&ssh\-user\(dq\& will be used at the ssh level; the \(dq\&rsync\-user\(dq\& will be
  307. used to log\-in to the \(dq\&module\(dq\&.
  308. .PP
  309. .SH "STARTING AN RSYNC DAEMON TO ACCEPT CONNECTIONS"
  310. .PP
  311. In order to connect to an rsync daemon, the remote system needs to have a
  312. daemon already running (or it needs to have configured something like inetd
  313. to spawn an rsync daemon for incoming connections on a particular port).
  314. For full information on how to start a daemon that will handling incoming
  315. socket connections, see the \fBrsyncd.conf\fP(5) man page \-\- that is the config
  316. file for the daemon, and it contains the full details for how to run the
  317. daemon (including stand\-alone and inetd configurations).
  318. .PP
  319. If you\(cq\&re using one of the remote\-shell transports for the transfer, there is
  320. no need to manually start an rsync daemon.
  321. .PP
  322. .SH "SORTED TRANSFER ORDER"
  323. .PP
  324. Rsync always sorts the specified filenames into its internal transfer list.
  325. This handles the merging together of the contents of identically named
  326. directories, makes it easy to remove duplicate filenames, and may confuse
  327. someone when the files are transferred in a different order than what was
  328. given on the command\-line.
  329. .PP
  330. If you need a particular file to be transferred prior to another, either
  331. separate the files into different rsync calls, or consider using
  332. \fB\-\-delay\-updates\fP (which doesn\(cq\&t affect the sorted transfer order, but
  333. does make the final file\-updating phase happen much more rapidly).
  334. .PP
  335. .SH "EXAMPLES"
  336. .PP
  337. Here are some examples of how I use rsync.
  338. .PP
  339. To backup my wife\(cq\&s home directory, which consists of large MS Word
  340. files and mail folders, I use a cron job that runs
  341. .PP
  342. .RS
  343. \f(CWrsync \-Cavz . arvidsjaur:backup\fP
  344. .RE
  345. .PP
  346. each night over a PPP connection to a duplicate directory on my machine
  347. \(dq\&arvidsjaur\(dq\&.
  348. .PP
  349. To synchronize my samba source trees I use the following Makefile
  350. targets:
  351. .PP
  352. .nf
  353. get:
  354. rsync \-avuzb \-\-exclude '\&*~'\& samba:samba/ .
  355. put:
  356. rsync \-Cavuzb . samba:samba/
  357. sync: get put
  358. .fi
  359. .PP
  360. this allows me to sync with a CVS directory at the other end of the
  361. connection. I then do CVS operations on the remote machine, which saves a
  362. lot of time as the remote CVS protocol isn\(cq\&t very efficient.
  363. .PP
  364. I mirror a directory between my \(dq\&old\(dq\& and \(dq\&new\(dq\& ftp sites with the
  365. command:
  366. .PP
  367. \f(CWrsync \-az \-e ssh \-\-delete ~ftp/pub/samba nimbus:\(dq\&~ftp/pub/tridge\(dq\&\fP
  368. .PP
  369. This is launched from cron every few hours.
  370. .PP
  371. .SH "OPTIONS SUMMARY"
  372. .PP
  373. Here is a short summary of the options available in rsync. Please refer
  374. to the detailed description below for a complete description.
  375. .nf
  376. \-v, \-\-verbose increase verbosity
  377. \-q, \-\-quiet suppress non\-error messages
  378. \-\-no\-motd suppress daemon\-mode MOTD (see caveat)
  379. \-c, \-\-checksum skip based on checksum, not mod\-time & size
  380. \-a, \-\-archive archive mode; equals \-rlptgoD (no \-H,\-A,\-X)
  381. \-\-no\-OPTION turn off an implied OPTION (e.g. \-\-no\-D)
  382. \-r, \-\-recursive recurse into directories
  383. \-R, \-\-relative use relative path names
  384. \-\-no\-implied\-dirs don'\&t send implied dirs with \-\-relative
  385. \-b, \-\-backup make backups (see \-\-suffix & \-\-backup\-dir)
  386. \-\-backup\-dir=DIR make backups into hierarchy based in DIR
  387. \-\-suffix=SUFFIX backup suffix (default ~ w/o \-\-backup\-dir)
  388. \-u, \-\-update skip files that are newer on the receiver
  389. \-\-inplace update destination files in\-place
  390. \-\-append append data onto shorter files
  391. \-\-append\-verify \-\-append w/old data in file checksum
  392. \-d, \-\-dirs transfer directories without recursing
  393. \-l, \-\-links copy symlinks as symlinks
  394. \-L, \-\-copy\-links transform symlink into referent file/dir
  395. \-\-copy\-unsafe\-links only \(dq\&unsafe\(dq\& symlinks are transformed
  396. \-\-safe\-links ignore symlinks that point outside the tree
  397. \-k, \-\-copy\-dirlinks transform symlink to dir into referent dir
  398. \-K, \-\-keep\-dirlinks treat symlinked dir on receiver as dir
  399. \-H, \-\-hard\-links preserve hard links
  400. \-p, \-\-perms preserve permissions
  401. \-E, \-\-executability preserve executability
  402. \-\-chmod=CHMOD affect file and/or directory permissions
  403. \-A, \-\-acls preserve ACLs (implies \-p)
  404. \-X, \-\-xattrs preserve extended attributes
  405. \-o, \-\-owner preserve owner (super\-user only)
  406. \-g, \-\-group preserve group
  407. \-\-devices preserve device files (super\-user only)
  408. \-\-specials preserve special files
  409. \-D same as \-\-devices \-\-specials
  410. \-t, \-\-times preserve modification times
  411. \-O, \-\-omit\-dir\-times omit directories from \-\-times
  412. \-\-super receiver attempts super\-user activities
  413. \-\-fake\-super store/recover privileged attrs using xattrs
  414. \-S, \-\-sparse handle sparse files efficiently
  415. \-n, \-\-dry\-run perform a trial run with no changes made
  416. \-W, \-\-whole\-file copy files whole (w/o delta\-xfer algorithm)
  417. \-x, \-\-one\-file\-system don'\&t cross filesystem boundaries
  418. \-B, \-\-block\-size=SIZE force a fixed checksum block\-size
  419. \-e, \-\-rsh=COMMAND specify the remote shell to use
  420. \-\-rsync\-path=PROGRAM specify the rsync to run on remote machine
  421. \-\-existing skip creating new files on receiver
  422. \-\-ignore\-existing skip updating files that exist on receiver
  423. \-\-remove\-source\-files sender removes synchronized files (non\-dir)
  424. \-\-del an alias for \-\-delete\-during
  425. \-\-delete delete extraneous files from dest dirs
  426. \-\-delete\-before receiver deletes before xfer, not during
  427. \-\-delete\-during receiver deletes during the transfer
  428. \-\-delete\-delay find deletions during, delete after
  429. \-\-delete\-after receiver deletes after transfer, not during
  430. \-\-delete\-excluded also delete excluded files from dest dirs
  431. \-\-ignore\-errors delete even if there are I/O errors
  432. \-\-force force deletion of dirs even if not empty
  433. \-\-max\-delete=NUM don'\&t delete more than NUM files
  434. \-\-max\-size=SIZE don'\&t transfer any file larger than SIZE
  435. \-\-min\-size=SIZE don'\&t transfer any file smaller than SIZE
  436. \-\-partial keep partially transferred files
  437. \-\-partial\-dir=DIR put a partially transferred file into DIR
  438. \-\-delay\-updates put all updated files into place at end
  439. \-m, \-\-prune\-empty\-dirs prune empty directory chains from file\-list
  440. \-\-numeric\-ids don'\&t map uid/gid values by user/group name
  441. \-\-timeout=SECONDS set I/O timeout in seconds
  442. \-\-contimeout=SECONDS set daemon connection timeout in seconds
  443. \-I, \-\-ignore\-times don'\&t skip files that match size and time
  444. \-\-size\-only skip files that match in size
  445. \-\-modify\-window=NUM compare mod\-times with reduced accuracy
  446. \-T, \-\-temp\-dir=DIR create temporary files in directory DIR
  447. \-y, \-\-fuzzy find similar file for basis if no dest file
  448. \-\-compare\-dest=DIR also compare received files relative to DIR
  449. \-\-copy\-dest=DIR ... and include copies of unchanged files
  450. \-\-link\-dest=DIR hardlink to files in DIR when unchanged
  451. \-z, \-\-compress compress file data during the transfer
  452. \-\-compress\-level=NUM explicitly set compression level
  453. \-\-skip\-compress=LIST skip compressing files with suffix in LIST
  454. \-C, \-\-cvs\-exclude auto\-ignore files in the same way CVS does
  455. \-f, \-\-filter=RULE add a file\-filtering RULE
  456. \-F same as \-\-filter='\&dir\-merge /.rsync\-filter'\&
  457. repeated: \-\-filter='\&\- .rsync\-filter'\&
  458. \-\-exclude=PATTERN exclude files matching PATTERN
  459. \-\-exclude\-from=FILE read exclude patterns from FILE
  460. \-\-include=PATTERN don'\&t exclude files matching PATTERN
  461. \-\-include\-from=FILE read include patterns from FILE
  462. \-\-files\-from=FILE read list of source\-file names from FILE
  463. \-0, \-\-from0 all *from/filter files are delimited by 0s
  464. \-s, \-\-protect\-args no space\-splitting; wildcard chars only
  465. \-\-address=ADDRESS bind address for outgoing socket to daemon
  466. \-\-port=PORT specify double\-colon alternate port number
  467. \-\-sockopts=OPTIONS specify custom TCP options
  468. \-\-blocking\-io use blocking I/O for the remote shell
  469. \-\-stats give some file\-transfer stats
  470. \-8, \-\-8\-bit\-output leave high\-bit chars unescaped in output
  471. \-h, \-\-human\-readable output numbers in a human\-readable format
  472. \-\-progress show progress during transfer
  473. \-P same as \-\-partial \-\-progress
  474. \-i, \-\-itemize\-changes output a change\-summary for all updates
  475. \-\-out\-format=FORMAT output updates using the specified FORMAT
  476. \-\-log\-file=FILE log what we'\&re doing to the specified FILE
  477. \-\-log\-file\-format=FMT log updates using the specified FMT
  478. \-\-password\-file=FILE read daemon\-access password from FILE
  479. \-\-list\-only list the files instead of copying them
  480. \-\-bwlimit=KBPS limit I/O bandwidth; KBytes per second
  481. \-\-write\-batch=FILE write a batched update to FILE
  482. \-\-only\-write\-batch=FILE like \-\-write\-batch but w/o updating dest
  483. \-\-read\-batch=FILE read a batched update from FILE
  484. \-\-protocol=NUM force an older protocol version to be used
  485. \-\-iconv=CONVERT_SPEC request charset conversion of filenames
  486. \-\-checksum\-seed=NUM set block/file checksum seed (advanced)
  487. \-4, \-\-ipv4 prefer IPv4
  488. \-6, \-\-ipv6 prefer IPv6
  489. \-\-version print version number
  490. (\-h) \-\-help show this help (see below for \-h comment)
  491. .fi
  492. .PP
  493. Rsync can also be run as a daemon, in which case the following options are
  494. accepted:
  495. .nf
  496. \-\-daemon run as an rsync daemon
  497. \-\-address=ADDRESS bind to the specified address
  498. \-\-bwlimit=KBPS limit I/O bandwidth; KBytes per second
  499. \-\-config=FILE specify alternate rsyncd.conf file
  500. \-\-no\-detach do not detach from the parent
  501. \-\-port=PORT listen on alternate port number
  502. \-\-log\-file=FILE override the \(dq\&log file\(dq\& setting
  503. \-\-log\-file\-format=FMT override the \(dq\&log format\(dq\& setting
  504. \-\-sockopts=OPTIONS specify custom TCP options
  505. \-v, \-\-verbose increase verbosity
  506. \-4, \-\-ipv4 prefer IPv4
  507. \-6, \-\-ipv6 prefer IPv6
  508. \-h, \-\-help show this help (if used after \-\-daemon)
  509. .fi
  510. .PP
  511. .SH "OPTIONS"
  512. .PP
  513. Rsync accepts both long (double\-dash + word) and short (single\-dash + letter)
  514. options. The full list of the available options are described below. If an
  515. option can be specified in more than one way, the choices are comma\-separated.
  516. Some options only have a long variant, not a short. If the option takes a
  517. parameter, the parameter is only listed after the long variant, even though it
  518. must also be specified for the short. When specifying a parameter, you can
  519. either use the form \-\-option=param or replace the \(cq\&=\(cq\& with whitespace. The
  520. parameter may need to be quoted in some manner for it to survive the shell\(cq\&s
  521. command\-line parsing. Keep in mind that a leading tilde (~) in a filename is
  522. substituted by your shell, so \-\-option=~/foo will not change the tilde into
  523. your home directory (remove the \(cq\&=\(cq\& for that).
  524. .PP
  525. .IP "\fB\-\-help\fP"
  526. Print a short help page describing the options
  527. available in rsync and exit. For backward\-compatibility with older
  528. versions of rsync, the help will also be output if you use the \fB\-h\fP
  529. option without any other args.
  530. .IP
  531. .IP "\fB\-\-version\fP"
  532. print the rsync version number and exit.
  533. .IP
  534. .IP "\fB\-v, \-\-verbose\fP"
  535. This option increases the amount of information you
  536. are given during the transfer. By default, rsync works silently. A
  537. single \fB\-v\fP will give you information about what files are being
  538. transferred and a brief summary at the end. Two \fB\-v\fP options will give you
  539. information on what files are being skipped and slightly more
  540. information at the end. More than two \fB\-v\fP options should only be used if
  541. you are debugging rsync.
  542. .IP
  543. Note that the names of the transferred files that are output are done using
  544. a default \fB\-\-out\-format\fP of \(dq\&%n%L\(dq\&, which tells you just the name of the
  545. file and, if the item is a link, where it points. At the single \fB\-v\fP
  546. level of verbosity, this does not mention when a file gets its attributes
  547. changed. If you ask for an itemized list of changed attributes (either
  548. \fB\-\-itemize\-changes\fP or adding \(dq\&%i\(dq\& to the \fB\-\-out\-format\fP setting), the
  549. output (on the client) increases to mention all items that are changed in
  550. any way. See the \fB\-\-out\-format\fP option for more details.
  551. .IP
  552. .IP "\fB\-q, \-\-quiet\fP"
  553. This option decreases the amount of information you
  554. are given during the transfer, notably suppressing information messages
  555. from the remote server. This option is useful when invoking rsync from
  556. cron.
  557. .IP
  558. .IP "\fB\-\-no\-motd\fP"
  559. This option affects the information that is output
  560. by the client at the start of a daemon transfer. This suppresses the
  561. message\-of\-the\-day (MOTD) text, but it also affects the list of modules
  562. that the daemon sends in response to the \(dq\&rsync host::\(dq\& request (due to
  563. a limitation in the rsync protocol), so omit this option if you want to
  564. request the list of modules from the daemon.
  565. .IP
  566. .IP "\fB\-I, \-\-ignore\-times\fP"
  567. Normally rsync will skip any files that are
  568. already the same size and have the same modification timestamp.
  569. This option turns off this \(dq\&quick check\(dq\& behavior, causing all files to
  570. be updated.
  571. .IP
  572. .IP "\fB\-\-size\-only\fP"
  573. This modifies rsync\(cq\&s \(dq\&quick check\(dq\& algorithm for
  574. finding files that need to be transferred, changing it from the default of
  575. transferring files with either a changed size or a changed last\-modified
  576. time to just looking for files that have changed in size. This is useful
  577. when starting to use rsync after using another mirroring system which may
  578. not preserve timestamps exactly.
  579. .IP
  580. .IP "\fB\-\-modify\-window\fP"
  581. When comparing two timestamps, rsync treats the
  582. timestamps as being equal if they differ by no more than the modify\-window
  583. value. This is normally 0 (for an exact match), but you may find it useful
  584. to set this to a larger value in some situations. In particular, when
  585. transferring to or from an MS Windows FAT filesystem (which represents
  586. times with a 2\-second resolution), \fB\-\-modify\-window=1\fP is useful
  587. (allowing times to differ by up to 1 second).
  588. .IP
  589. .IP "\fB\-c, \-\-checksum\fP"
  590. This changes the way rsync checks if the files have
  591. been changed and are in need of a transfer. Without this option, rsync
  592. uses a \(dq\&quick check\(dq\& that (by default) checks if each file\(cq\&s size and time
  593. of last modification match between the sender and receiver. This option
  594. changes this to compare a 128\-bit checksum for each file that has a
  595. matching size. Generating the checksums means that both sides will expend
  596. a lot of disk I/O reading all the data in the files in the transfer (and
  597. this is prior to any reading that will be done to transfer changed files),
  598. so this can slow things down significantly.
  599. .IP
  600. The sending side generates its checksums while it is doing the file\-system
  601. scan that builds the list of the available files. The receiver generates
  602. its checksums when it is scanning for changed files, and will checksum any
  603. file that has the same size as the corresponding sender\(cq\&s file: files with
  604. either a changed size or a changed checksum are selected for transfer.
  605. .IP
  606. Note that rsync always verifies that each \fItransferred\fP file was
  607. correctly reconstructed on the receiving side by checking a whole\-file
  608. checksum that is generated as the file is transferred, but that
  609. automatic after\-the\-transfer verification has nothing to do with this
  610. option\(cq\&s before\-the\-transfer \(dq\&Does this file need to be updated?\(dq\& check.
  611. .IP
  612. For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
  613. MD5. For older protocols, the checksum used is MD4.
  614. .IP
  615. .IP "\fB\-a, \-\-archive\fP"
  616. This is equivalent to \fB\-rlptgoD\fP. It is a quick
  617. way of saying you want recursion and want to preserve almost
  618. everything (with \-H being a notable omission).
  619. The only exception to the above equivalence is when \fB\-\-files\-from\fP is
  620. specified, in which case \fB\-r\fP is not implied.
  621. .IP
  622. Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because
  623. finding multiply\-linked files is expensive. You must separately
  624. specify \fB\-H\fP.
  625. .IP
  626. .IP "\-\-no\-OPTION"
  627. You may turn off one or more implied options by prefixing
  628. the option name with \(dq\&no\-\(dq\&. Not all options may be prefixed with a \(dq\&no\-\(dq\&:
  629. only options that are implied by other options (e.g. \fB\-\-no\-D\fP,
  630. \fB\-\-no\-perms\fP) or have different defaults in various circumstances
  631. (e.g. \fB\-\-no\-whole\-file\fP, \fB\-\-no\-blocking\-io\fP, \fB\-\-no\-dirs\fP). You may
  632. specify either the short or the long option name after the \(dq\&no\-\(dq\& prefix
  633. (e.g. \fB\-\-no\-R\fP is the same as \fB\-\-no\-relative\fP).
  634. .IP
  635. For example: if you want to use \fB\-a\fP (\fB\-\-archive\fP) but don\(cq\&t want
  636. \fB\-o\fP (\fB\-\-owner\fP), instead of converting \fB\-a\fP into \fB\-rlptgD\fP, you
  637. could specify \fB\-a \-\-no\-o\fP (or \fB\-a \-\-no\-owner\fP).
  638. .IP
  639. The order of the options is important: if you specify \fB\-\-no\-r \-a\fP, the
  640. \fB\-r\fP option would end up being turned on, the opposite of \fB\-a \-\-no\-r\fP.
  641. Note also that the side\-effects of the \fB\-\-files\-from\fP option are NOT
  642. positional, as it affects the default state of several options and slightly
  643. changes the meaning of \fB\-a\fP (see the \fB\-\-files\-from\fP option for more
  644. details).
  645. .IP
  646. .IP "\fB\-r, \-\-recursive\fP"
  647. This tells rsync to copy directories
  648. recursively. See also \fB\-\-dirs\fP (\fB\-d\fP).
  649. .IP
  650. Beginning with rsync 3.0.0, the recursive algorithm used is now an
  651. incremental scan that uses much less memory than before and begins the
  652. transfer after the scanning of the first few directories have been
  653. completed. This incremental scan only affects our recursion algorithm, and
  654. does not change a non\-recursive transfer. It is also only possible when
  655. both ends of the transfer are at least version 3.0.0.
  656. .IP
  657. Some options require rsync to know the full file list, so these options
  658. disable the incremental recursion mode. These include: \fB\-\-delete\-before\fP,
  659. \fB\-\-delete\-after\fP, \fB\-\-prune\-empty\-dirs\fP, and \fB\-\-delay\-updates\fP.
  660. Because of this, the default delete mode when you specify \fB\-\-delete\fP is now
  661. \fB\-\-delete\-during\fP when both ends of the connection are at least 3.0.0
  662. (use \fB\-\-del\fP or \fB\-\-delete\-during\fP to request this improved deletion mode
  663. explicitly). See also the \fB\-\-delete\-delay\fP option that is a better choice
  664. than using \fB\-\-delete\-after\fP.
  665. .IP
  666. Incremental recursion can be disabled using the \fB\-\-no\-inc\-recursive\fP
  667. option or its shorter \fB\-\-no\-i\-r\fP alias.
  668. .IP
  669. .IP "\fB\-R, \-\-relative\fP"
  670. Use relative paths. This means that the full path
  671. names specified on the command line are sent to the server rather than
  672. just the last parts of the filenames. This is particularly useful when
  673. you want to send several different directories at the same time. For
  674. example, if you used this command:
  675. .IP
  676. .RS
  677. \f(CW rsync \-av /foo/bar/baz.c remote:/tmp/\fP
  678. .RE
  679. .IP
  680. \&... this would create a file named baz.c in /tmp/ on the remote
  681. machine. If instead you used
  682. .IP
  683. .RS
  684. \f(CW rsync \-avR /foo/bar/baz.c remote:/tmp/\fP
  685. .RE
  686. .IP
  687. then a file named /tmp/foo/bar/baz.c would be created on the remote
  688. machine, preserving its full path. These extra path elements are called
  689. \(dq\&implied directories\(dq\& (i.e. the \(dq\&foo\(dq\& and the \(dq\&foo/bar\(dq\& directories in the
  690. above example).
  691. .IP
  692. Beginning with rsync 3.0.0, rsync always sends these implied directories as
  693. real directories in the file list, even if a path element is really a
  694. symlink on the sending side. This prevents some really unexpected
  695. behaviors when copying the full path of a file that you didn\(cq\&t realize had
  696. a symlink in its path. If you want to duplicate a server\-side symlink,
  697. include both the symlink via its path, and referent directory via its real
  698. path. If you\(cq\&re dealing with an older rsync on the sending side, you may
  699. need to use the \fB\-\-no\-implied\-dirs\fP option.
  700. .IP
  701. It is also possible to limit the amount of path information that is sent as
  702. implied directories for each path you specify. With a modern rsync on the
  703. sending side (beginning with 2.6.7), you can insert a dot and a slash into
  704. the source path, like this:
  705. .IP
  706. .RS
  707. \f(CW rsync \-avR /foo/./bar/baz.c remote:/tmp/\fP
  708. .RE
  709. .IP
  710. That would create /tmp/bar/baz.c on the remote machine. (Note that the
  711. dot must be followed by a slash, so \(dq\&/foo/.\(dq\& would not be abbreviated.)
  712. For older rsync versions, you would need to use a chdir to limit the
  713. source path. For example, when pushing files:
  714. .IP
  715. .RS
  716. \f(CW (cd /foo; rsync \-avR bar/baz.c remote:/tmp/) \fP
  717. .RE
  718. .IP
  719. (Note that the parens put the two commands into a sub\-shell, so that the
  720. \(dq\&cd\(dq\& command doesn\(cq\&t remain in effect for future commands.)
  721. If you\(cq\&re pulling files from an older rsync, use this idiom (but only
  722. for a non\-daemon transfer):
  723. .IP
  724. .RS
  725. \f(CW rsync \-avR \-\-rsync\-path=\(dq\&cd /foo; rsync\(dq\& \e \fP
  726. .br
  727. \f(CW remote:bar/baz.c /tmp/\fP
  728. .RE
  729. .IP
  730. .IP "\fB\-\-no\-implied\-dirs\fP"
  731. This option affects the default behavior of the
  732. \fB\-\-relative\fP option. When it is specified, the attributes of the implied
  733. directories from the source names are not included in the transfer. This
  734. means that the corresponding path elements on the destination system are
  735. left unchanged if they exist, and any missing implied directories are
  736. created with default attributes. This even allows these implied path
  737. elements to have big differences, such as being a symlink to a directory on
  738. the receiving side.
  739. .IP
  740. For instance, if a command\-line arg or a files\-from entry told rsync to
  741. transfer the file \(dq\&path/foo/file\(dq\&, the directories \(dq\&path\(dq\& and \(dq\&path/foo\(dq\&
  742. are implied when \fB\-\-relative\fP is used. If \(dq\&path/foo\(dq\& is a symlink to
  743. \(dq\&bar\(dq\& on the destination system, the receiving rsync would ordinarily
  744. delete \(dq\&path/foo\(dq\&, recreate it as a directory, and receive the file into
  745. the new directory. With \fB\-\-no\-implied\-dirs\fP, the receiving rsync updates
  746. \(dq\&path/foo/file\(dq\& using the existing path elements, which means that the file
  747. ends up being created in \(dq\&path/bar\(dq\&. Another way to accomplish this link
  748. preservation is to use the \fB\-\-keep\-dirlinks\fP option (which will also
  749. affect symlinks to directories in the rest of the transfer).
  750. .IP
  751. When pulling files from an rsync older than 3.0.0, you may need to use this
  752. option if the sending side has a symlink in the path you request and you
  753. wish the implied directories to be transferred as normal directories.
  754. .IP
  755. .IP "\fB\-b, \-\-backup\fP"
  756. With this option, preexisting destination files are
  757. renamed as each file is transferred or deleted. You can control where the
  758. backup file goes and what (if any) suffix gets appended using the
  759. \fB\-\-backup\-dir\fP and \fB\-\-suffix\fP options.
  760. .IP
  761. Note that if you don\(cq\&t specify \fB\-\-backup\-dir\fP, (1) the
  762. \fB\-\-omit\-dir\-times\fP option will be implied, and (2) if \fB\-\-delete\fP is
  763. also in effect (without \fB\-\-delete\-excluded\fP), rsync will add a \(dq\&protect\(dq\&
  764. filter\-rule for the backup suffix to the end of all your existing excludes
  765. (e.g. \fB\-f \(dq\&P *~\(dq\&\fP). This will prevent previously backed\-up files from being
  766. deleted. Note that if you are supplying your own filter rules, you may
  767. need to manually insert your own exclude/protect rule somewhere higher up
  768. in the list so that it has a high enough priority to be effective (e.g., if
  769. your rules specify a trailing inclusion/exclusion of \(cq\&*\(cq\&, the auto\-added
  770. rule would never be reached).
  771. .IP
  772. .IP "\fB\-\-backup\-dir=DIR\fP"
  773. In combination with the \fB\-\-backup\fP option, this
  774. tells rsync to store all backups in the specified directory on the receiving
  775. side. This can be used for incremental backups. You can additionally
  776. specify a backup suffix using the \fB\-\-suffix\fP option
  777. (otherwise the files backed up in the specified directory
  778. will keep their original filenames).
  779. .IP
  780. Note that if you specify a relative path, the backup directory will be
  781. relative to the destination directory, so you probably want to specify
  782. either an absolute path or a path that starts with \(dq\&../\(dq\&. If an rsync
  783. daemon is the receiver, the backup dir cannot go outside the module\(cq\&s path
  784. hierarchy, so take extra care not to delete it or copy into it.
  785. .IP
  786. .IP "\fB\-\-suffix=SUFFIX\fP"
  787. This option allows you to override the default
  788. backup suffix used with the \fB\-\-backup\fP (\fB\-b\fP) option. The default suffix is a ~
  789. if no \-\fB\-backup\-dir\fP was specified, otherwise it is an empty string.
  790. .IP
  791. .IP "\fB\-u, \-\-update\fP"
  792. This forces rsync to skip any files which exist on
  793. the destination and have a modified time that is newer than the source
  794. file. (If an existing destination file has a modification time equal to the
  795. source file\(cq\&s, it will be updated if the sizes are different.)
  796. .IP
  797. Note that this does not affect the copying of symlinks or other special
  798. files. Also, a difference of file format between the sender and receiver
  799. is always considered to be important enough for an update, no matter what
  800. date is on the objects. In other words, if the source has a directory
  801. where the destination has a file, the transfer would occur regardless of
  802. the timestamps.
  803. .IP
  804. This option is a transfer rule, not an exclude, so it doesn\(cq\&t affect the
  805. data that goes into the file\-lists, and thus it doesn\(cq\&t affect deletions.
  806. It just limits the files that the receiver requests to be transferred.
  807. .IP
  808. .IP "\fB\-\-inplace\fP"
  809. This option changes how rsync transfers a file when
  810. its data needs to be updated: instead of the default method of creating
  811. a new copy of the file and moving it into place when it is complete, rsync
  812. instead writes the updated data directly to the destination file.
  813. .IP
  814. This has several effects:
  815. .IP
  816. .RS
  817. .IP o
  818. Hard links are not broken. This means the new data will be visible
  819. through other hard links to the destination file. Moreover, attempts to
  820. copy differing source files onto a multiply\-linked destination file will
  821. result in a \(dq\&tug of war\(dq\& with the destination data changing back and forth.
  822. .IP o
  823. In\-use binaries cannot be updated (either the OS will prevent this from
  824. happening, or binaries that attempt to swap\-in their data will misbehave or
  825. crash).
  826. .IP o
  827. The file\(cq\&s data will be in an inconsistent state during the transfer
  828. and will be left that way if the transfer is interrupted or if an update
  829. fails.
  830. .IP o
  831. A file that rsync cannot write to cannot be updated. While a super user
  832. can update any file, a normal user needs to be granted write permission for
  833. the open of the file for writing to be successful.
  834. .IP o
  835. The efficiency of rsync\(cq\&s delta\-transfer algorithm may be reduced if
  836. some data in the destination file is overwritten before it can be copied to
  837. a position later in the file. This does not apply if you use \fB\-\-backup\fP,
  838. since rsync is smart enough to use the backup file as the basis file for the
  839. transfer.
  840. .RE
  841. .IP
  842. WARNING: you should not use this option to update files that are being
  843. accessed by others, so be careful when choosing to use this for a copy.
  844. .IP
  845. This option is useful for transferring large files with block\-based changes
  846. or appended data, and also on systems that are disk bound, not network
  847. bound. It can also help keep a copy\-on\-write filesystem snapshot from
  848. diverging the entire contents of a file that only has minor changes.
  849. .IP
  850. The option implies \fB\-\-partial\fP (since an interrupted transfer does not delete
  851. the file), but conflicts with \fB\-\-partial\-dir\fP and \fB\-\-delay\-updates\fP.
  852. Prior to rsync 2.6.4 \fB\-\-inplace\fP was also incompatible with \fB\-\-compare\-dest\fP
  853. and \fB\-\-link\-dest\fP.
  854. .IP
  855. .IP "\fB\-\-append\fP"
  856. This causes rsync to update a file by appending data onto
  857. the end of the file, which presumes that the data that already exists on
  858. the receiving side is identical with the start of the file on the sending
  859. side. If a file needs to be transferred and its size on the receiver is
  860. the same or longer than the size on the sender, the file is skipped. This
  861. does not interfere with the updating of a file\(cq\&s non\-content attributes
  862. (e.g. permissions, ownership, etc.) when the file does not need to be
  863. transferred, nor does it affect the updating of any non\-regular files.
  864. Implies \fB\-\-inplace\fP,
  865. but does not conflict with \fB\-\-sparse\fP (since it is always extending a
  866. file\(cq\&s length).
  867. .IP
  868. .IP "\fB\-\-append\-verify\fP"
  869. This works just like the \fB\-\-append\fP option, but
  870. the existing data on the receiving side is included in the full\-file
  871. checksum verification step, which will cause a file to be resent if the
  872. final verification step fails (rsync uses a normal, non\-appending
  873. \fB\-\-inplace\fP transfer for the resend).
  874. .IP
  875. Note: prior to rsync 3.0.0, the \fB\-\-append\fP option worked like
  876. \fB\-\-append\-verify\fP, so if you are interacting with an older rsync (or the
  877. transfer is using a protocol prior to 30), specifying either append option
  878. will initiate an \fB\-\-append\-verify\fP transfer.
  879. .IP
  880. .IP "\fB\-d, \-\-dirs\fP"
  881. Tell the sending side to include any directories that
  882. are encountered. Unlike \fB\-\-recursive\fP, a directory\(cq\&s contents are not copied
  883. unless the directory name specified is \(dq\&.\(dq\& or ends with a trailing slash
  884. (e.g. \(dq\&.\(dq\&, \(dq\&dir/.\(dq\&, \(dq\&dir/\(dq\&, etc.). Without this option or the
  885. \fB\-\-recursive\fP option, rsync will skip all directories it encounters (and
  886. output a message to that effect for each one). If you specify both
  887. \fB\-\-dirs\fP and \fB\-\-recursive\fP, \fB\-\-recursive\fP takes precedence.
  888. .IP
  889. The \fB\-\-dirs\fP option is implied by the \fB\-\-files\-from\fP option
  890. or the \fB\-\-list\-only\fP option (including an implied
  891. \fB\-\-list\-only\fP usage) if \fB\-\-recursive\fP wasn\(cq\&t specified (so that
  892. directories are seen in the listing). Specify \fB\-\-no\-dirs\fP (or \fB\-\-no\-d\fP)
  893. if you want to turn this off.
  894. .IP
  895. There is also a backward\-compatibility helper option, \fB\-\-old\-dirs\fP (or
  896. \fB\-\-old\-d\fP) that tells rsync to use a hack of \(dq\&\-r \-\-exclude=\(cq\&/*/*\(cq\&\(dq\& to get
  897. an older rsync to list a single directory without recursing.
  898. .IP
  899. .IP "\fB\-l, \-\-links\fP"
  900. When symlinks are encountered, recreate the
  901. symlink on the destination.
  902. .IP
  903. .IP "\fB\-L, \-\-copy\-links\fP"
  904. When symlinks are encountered, the item that
  905. they point to (the referent) is copied, rather than the symlink. In older
  906. versions of rsync, this option also had the side\-effect of telling the
  907. receiving side to follow symlinks, such as symlinks to directories. In a
  908. modern rsync such as this one, you\(cq\&ll need to specify \fB\-\-keep\-dirlinks\fP (\fB\-K\fP)
  909. to get this extra behavior. The only exception is when sending files to
  910. an rsync that is too old to understand \fB\-K\fP \-\- in that case, the \fB\-L\fP option
  911. will still have the side\-effect of \fB\-K\fP on that older receiving rsync.
  912. .IP
  913. .IP "\fB\-\-copy\-unsafe\-links\fP"
  914. This tells rsync to copy the referent of
  915. symbolic links that point outside the copied tree. Absolute symlinks
  916. are also treated like ordinary files, and so are any symlinks in the
  917. source path itself when \fB\-\-relative\fP is used. This option has no
  918. additional effect if \fB\-\-copy\-links\fP was also specified.
  919. .IP
  920. .IP "\fB\-\-safe\-links\fP"
  921. This tells rsync to ignore any symbolic links
  922. which point outside the copied tree. All absolute symlinks are
  923. also ignored. Using this option in conjunction with \fB\-\-relative\fP may
  924. give unexpected results.
  925. .IP
  926. .IP "\fB\-k, \-\-copy\-dirlinks\fP"
  927. This option causes the sending side to treat
  928. a symlink to a directory as though it were a real directory. This is
  929. useful if you don\(cq\&t want symlinks to non\-directories to be affected, as
  930. they would be using \fB\-\-copy\-links\fP.
  931. .IP
  932. Without this option, if the sending side has replaced a directory with a
  933. symlink to a directory, the receiving side will delete anything that is in
  934. the way of the new symlink, including a directory hierarchy (as long as
  935. \fB\-\-force\fP or \fB\-\-delete\fP is in effect).
  936. .IP
  937. See also \fB\-\-keep\-dirlinks\fP for an analogous option for the receiving
  938. side.
  939. .IP
  940. \fB\-\-copy\-dirlinks\fP applies to all symlinks to directories in the source. If
  941. you want to follow only a few specified symlinks, a trick you can use is to
  942. pass them as additional source args with a trailing slash, using \fB\-\-relative\fP
  943. to make the paths match up right. For example:
  944. .IP
  945. .RS
  946. \f(CWrsync \-r \-\-relative src/./ src/./follow\-me/ dest/\fP
  947. .RE
  948. .IP
  949. This works because rsync calls \fBlstat\fP(2) on the source arg as given, and the
  950. trailing slash makes \fBlstat\fP(2) follow the symlink, giving rise to a directory
  951. in the file\-list which overrides the symlink found during the scan of \(dq\&src/./\(dq\&.
  952. .IP
  953. .IP "\fB\-K, \-\-keep\-dirlinks\fP"
  954. This option causes the receiving side to treat
  955. a symlink to a directory as though it were a real directory, but only if it
  956. matches a real directory from the sender. Without this option, the
  957. receiver\(cq\&s symlink would be deleted and replaced with a real directory.
  958. .IP
  959. For example, suppose you transfer a directory \(dq\&foo\(dq\& that contains a file
  960. \(dq\&file\(dq\&, but \(dq\&foo\(dq\& is a symlink to directory \(dq\&bar\(dq\& on the receiver. Without
  961. \fB\-\-keep\-dirlinks\fP, the receiver deletes symlink \(dq\&foo\(dq\&, recreates it as a
  962. directory, and receives the file into the new directory. With
  963. \fB\-\-keep\-dirlinks\fP, the receiver keeps the symlink and \(dq\&file\(dq\& ends up in
  964. \(dq\&bar\(dq\&.
  965. .IP
  966. One note of caution: if you use \fB\-\-keep\-dirlinks\fP, you must trust all
  967. the symlinks in the copy! If it is possible for an untrusted user to
  968. create their own symlink to any directory, the user could then (on a
  969. subsequent copy) replace the symlink with a real directory and affect the
  970. content of whatever directory the symlink references. For backup copies,
  971. you are better off using something like a bind mount instead of a symlink
  972. to modify your receiving hierarchy.
  973. .IP
  974. See also \fB\-\-copy\-dirlinks\fP for an analogous option for the sending side.
  975. .IP
  976. .IP "\fB\-H, \-\-hard\-links\fP"
  977. This tells rsync to look for hard\-linked files in
  978. the source and link together the corresponding files on the destination.
  979. Without this option, hard\-linked files in the source are treated
  980. as though they were separate files.
  981. .IP
  982. This option does NOT necessarily ensure that the pattern of hard links on the
  983. destination exactly matches that on the source. Cases in which the
  984. destination may end up with extra hard links include the following:
  985. .IP
  986. .RS
  987. .IP o
  988. If the destination contains extraneous hard\-links (more linking than
  989. what is present in the source file list), the copying algorithm will not
  990. break them explicitly. However, if one or more of the paths have content
  991. differences, the normal file\-update process will break those extra links
  992. (unless you are using the \fB\-\-inplace\fP option).
  993. .IP o
  994. If you specify a \fB\-\-link\-dest\fP directory that contains hard links,
  995. the linking of the destination files against the \fB\-\-link\-dest\fP files can
  996. cause some paths in the destination to become linked together due to the
  997. \fB\-\-link\-dest\fP associations.
  998. .RE
  999. .IP
  1000. Note that rsync can only detect hard links between files that are inside
  1001. the transfer set. If rsync updates a file that has extra hard\-link
  1002. connections to files outside the transfer, that linkage will be broken. If
  1003. you are tempted to use the \fB\-\-inplace\fP option to avoid this breakage, be
  1004. very careful that you know how your files are being updated so that you are
  1005. certain that no unintended changes happen due to lingering hard links (and
  1006. see the \fB\-\-inplace\fP option for more caveats).
  1007. .IP
  1008. If incremental recursion is active (see \fB\-\-recursive\fP), rsync may transfer
  1009. a missing hard\-linked file before it finds that another link for that contents
  1010. exists elsewhere in the hierarchy. This does not affect the accuracy of
  1011. the transfer (i.e. which files are hard\-linked together), just its efficiency
  1012. (i.e. copying the data for a new, early copy of a hard\-linked file that could
  1013. have been found later in the transfer in another member of the hard\-linked
  1014. set of files). One way to avoid this inefficiency is to disable
  1015. incremental recursion using the \fB\-\-no\-inc\-recursive\fP option.
  1016. .IP
  1017. .IP "\fB\-p, \-\-perms\fP"
  1018. This option causes the receiving rsync to set the
  1019. destination permissions to be the same as the source permissions. (See
  1020. also the \fB\-\-chmod\fP option for a way to modify what rsync considers to
  1021. be the source permissions.)
  1022. .IP
  1023. When this option is \fIoff\fP, permissions are set as follows:
  1024. .IP
  1025. .RS
  1026. .IP o
  1027. Existing files (including updated files) retain their existing
  1028. permissions, though the \fB\-\-executability\fP option might change just
  1029. the execute permission for the file.
  1030. .IP o
  1031. New files get their \(dq\&normal\(dq\& permission bits set to the source
  1032. file\(cq\&s permissions masked with the receiving directory\(cq\&s default
  1033. permissions (either the receiving process\(cq\&s umask, or the permissions
  1034. specified via the destination directory\(cq\&s default ACL), and
  1035. their special permission bits disabled except in the case where a new
  1036. directory inherits a setgid bit from its parent directory.
  1037. .RE
  1038. .IP
  1039. Thus, when \fB\-\-perms\fP and \fB\-\-executability\fP are both disabled,
  1040. rsync\(cq\&s behavior is the same as that of other file\-copy utilities,
  1041. such as \fBcp\fP(1) and \fBtar\fP(1).
  1042. .IP
  1043. In summary: to give destination files (both old and new) the source
  1044. permissions, use \fB\-\-perms\fP. To give new files the destination\-default
  1045. permissions (while leaving existing files unchanged), make sure that the
  1046. \fB\-\-perms\fP option is off and use \fB\-\-chmod=ugo=rwX\fP (which ensures that
  1047. all non\-masked bits get enabled). If you\(cq\&d care to make this latter
  1048. behavior easier to type, you could define a popt alias for it, such as
  1049. putting this line in the file ~/.popt (the following defines the \fB\-Z\fP option,
  1050. and includes \-\-no\-g to use the default group of the destination dir):
  1051. .IP
  1052. .RS
  1053. \f(CW rsync alias \-Z \-\-no\-p \-\-no\-g \-\-chmod=ugo=rwX\fP
  1054. .RE
  1055. .IP
  1056. You could then use this new option in a command such as this one:
  1057. .IP
  1058. .RS
  1059. \f(CW rsync \-avZ src/ dest/\fP
  1060. .RE
  1061. .IP
  1062. (Caveat: make sure that \fB\-a\fP does not follow \fB\-Z\fP, or it will re\-enable
  1063. the two \(dq\&\-\-no\-*\(dq\& options mentioned above.)
  1064. .IP
  1065. The preservation of the destination\(cq\&s setgid bit on newly\-created
  1066. directories when \fB\-\-perms\fP is off was added in rsync 2.6.7. Older rsync
  1067. versions erroneously preserved the three special permission bits for
  1068. newly\-created files when \fB\-\-perms\fP was off, while overriding the
  1069. destination\(cq\&s setgid bit setting on a newly\-created directory. Default ACL
  1070. observance was added to the ACL patch for rsync 2.6.7, so older (or
  1071. non\-ACL\-enabled) rsyncs use the umask even if default ACLs are present.
  1072. (Keep in mind that it is the version of the receiving rsync that affects
  1073. these behaviors.)
  1074. .IP
  1075. .IP "\fB\-E, \-\-executability\fP"
  1076. This option causes rsync to preserve the
  1077. executability (or non\-executability) of regular files when \fB\-\-perms\fP is
  1078. not enabled. A regular file is considered to be executable if at least one
  1079. \(cq\&x\(cq\& is turned on in its permissions. When an existing destination file\(cq\&s
  1080. executability differs from that of the corresponding source file, rsync
  1081. modifies the destination file\(cq\&s permissions as follows:
  1082. .IP
  1083. .RS
  1084. .IP o
  1085. To make a file non\-executable, rsync turns off all its \(cq\&x\(cq\&
  1086. permissions.
  1087. .IP o
  1088. To make a file executable, rsync turns on each \(cq\&x\(cq\& permission that
  1089. has a corresponding \(cq\&r\(cq\& permission enabled.
  1090. .RE
  1091. .IP
  1092. If \fB\-\-perms\fP is enabled, this option is ignored.
  1093. .IP
  1094. .IP "\fB\-A, \-\-acls\fP"
  1095. This option causes rsync to update the destination
  1096. ACLs to be the same as the source ACLs.
  1097. The option also implies \fB\-\-perms\fP.
  1098. .IP
  1099. The source and destination systems must have compatible ACL entries for this
  1100. option to work properly. See the \fB\-\-fake\-super\fP option for a way to backup
  1101. and restore ACLs that are not compatible.
  1102. .IP
  1103. .IP "\fB\-X, \-\-xattrs\fP"
  1104. This option causes rsync to update the destination
  1105. extended attributes to be the same as the source ones.
  1106. .IP
  1107. For systems that support extended\-attribute namespaces, a copy being done by a
  1108. super\-user copies all namespaces except system.*. A normal user only copies
  1109. the user.* namespace. To be able to backup and restore non\-user namespaces as
  1110. a normal user, see the \fB\-\-fake\-super\fP option.
  1111. .IP
  1112. Note that this option does not copy rsyncs special xattr values (e.g. those
  1113. used by \fB\-\-fake\-super\fP) unless you repeat the option (e.g. \-XX). This
  1114. \(dq\&copy all xattrs\(dq\& mode cannot be used with \fB\-\-fake\-super\fP.
  1115. .IP
  1116. .IP "\fB\-\-chmod\fP"
  1117. This option tells rsync to apply one or more
  1118. comma\-separated \(dq\&chmod\(dq\& modes to the permission of the files in the
  1119. transfer. The resulting value is treated as though it were the permissions
  1120. that the sending side supplied for the file, which means that this option
  1121. can seem to have no effect on existing files if \fB\-\-perms\fP is not enabled.
  1122. .IP
  1123. In addition to the normal parsing rules specified in the \fBchmod\fP(1)
  1124. manpage, you can specify an item that should only apply to a directory by
  1125. prefixing it with a \(cq\&D\(cq\&, or specify an item that should only apply to a
  1126. file by prefixing it with a \(cq\&F\(cq\&. For example, the following will ensure
  1127. that all directories get marked set\-gid, that no files are other\-writable,
  1128. that both are user\-writable and group\-writable, and that both have
  1129. consistent executability across all bits:
  1130. .IP
  1131. .RS
  1132. \-\-chmod=Dg+s,ug+w,Fo\-w,+X
  1133. .RE
  1134. .IP
  1135. It is also legal to specify multiple \fB\-\-chmod\fP options, as each
  1136. additional option is just appended to the list of changes to make.
  1137. .IP
  1138. See the \fB\-\-perms\fP and \fB\-\-executability\fP options for how the resulting
  1139. permission value can be applied to the files in the transfer.
  1140. .IP
  1141. .IP "\fB\-o, \-\-owner\fP"
  1142. This option causes rsync to set the owner of the
  1143. destination file to be the same as the source file, but only if the
  1144. receiving rsync is being run as the super\-user (see also the \fB\-\-super\fP
  1145. and \fB\-\-fake\-super\fP options).
  1146. Without this option, the owner of new and/or transferred files are set to
  1147. the invoking user on the receiving side.
  1148. .IP
  1149. The preservation of ownership will associate matching names by default, but
  1150. may fall back to using the ID number in some circumstances (see also the
  1151. \fB\-\-numeric\-ids\fP option for a full discussion).
  1152. .IP
  1153. .IP "\fB\-g, \-\-group\fP"
  1154. This option causes rsync to set the group of the
  1155. destination file to be the same as the source file. If the receiving
  1156. program is not running as the super\-user (or if \fB\-\-no\-super\fP was
  1157. specified), only groups that the invoking user on the receiving side
  1158. is a member of will be preserved.
  1159. Without this option, the group is set to the default group of the invoking
  1160. user on the receiving side.
  1161. .IP
  1162. The preservation of group information will associate matching names by
  1163. default, but may fall back to using the ID number in some circumstances
  1164. (see also the \fB\-\-numeric\-ids\fP option for a full discussion).
  1165. .IP
  1166. .IP "\fB\-\-devices\fP"
  1167. This option causes rsync to transfer character and
  1168. block device files to the remote system to recreate these devices.
  1169. This option has no effect if the receiving rsync is not run as the
  1170. super\-user (see also the \fB\-\-super\fP and \fB\-\-fake\-super\fP options).
  1171. .IP
  1172. .IP "\fB\-\-specials\fP"
  1173. This option causes rsync to transfer special files
  1174. such as named sockets and fifos.
  1175. .IP
  1176. .IP "\fB\-D\fP"
  1177. The \fB\-D\fP option is equivalent to \fB\-\-devices\fP \fB\-\-specials\fP.
  1178. .IP
  1179. .IP "\fB\-t, \-\-times\fP"
  1180. This tells rsync to transfer modification times along
  1181. with the files and update them on the remote system. Note that if this
  1182. option is not used, the optimization that excludes files that have not been
  1183. modified cannot be effective; in other words, a missing \fB\-t\fP or \fB\-a\fP will
  1184. cause the next transfer to behave as if it used \fB\-I\fP, causing all files to be
  1185. updated (though rsync\(cq\&s delta\-transfer algorithm will make the update fairly efficient
  1186. if the files haven\(cq\&t actually changed, you\(cq\&re much better off using \fB\-t\fP).
  1187. .IP
  1188. .IP "\fB\-O, \-\-omit\-dir\-times\fP"
  1189. This tells rsync to omit directories when
  1190. it is preserving modification times (see \fB\-\-times\fP). If NFS is sharing
  1191. the directories on the receiving side, it is a good idea to use \fB\-O\fP.
  1192. This option is inferred if you use \fB\-\-backup\fP without \fB\-\-backup\-dir\fP.
  1193. .IP
  1194. .IP "\fB\-\-super\fP"
  1195. This tells the receiving side to attempt super\-user
  1196. activities even if the receiving rsync wasn\(cq\&t run by the super\-user. These
  1197. activities include: preserving users via the \fB\-\-owner\fP option, preserving
  1198. all groups (not just the current user\(cq\&s groups) via the \fB\-\-groups\fP
  1199. option, and copying devices via the \fB\-\-devices\fP option. This is useful
  1200. for systems that allow such activities without being the super\-user, and
  1201. also for ensuring that you will get errors if the receiving side isn\(cq\&t
  1202. being run as the super\-user. To turn off super\-user activities, the
  1203. super\-user can use \fB\-\-no\-super\fP.
  1204. .IP
  1205. .IP "\fB\-\-fake\-super\fP"
  1206. When this option is enabled, rsync simulates
  1207. super\-user activities by saving/restoring the privileged attributes via
  1208. special extended attributes that are attached to each file (as needed). This
  1209. includes the file\(cq\&s owner and group (if it is not the default), the file\(cq\&s
  1210. device info (device & special files are created as empty text files), and
  1211. any permission bits that we won\(cq\&t allow to be set on the real file (e.g.
  1212. the real file gets u\-s,g\-s,o\-t for safety) or that would limit the owner\(cq\&s
  1213. access (since the real super\-user can always access/change a file, the
  1214. files we create can always be accessed/changed by the creating user).
  1215. This option also handles ACLs (if \fB\-\-acls\fP was specified) and non\-user
  1216. extended attributes (if \fB\-\-xattrs\fP was specified).
  1217. .IP
  1218. This is a good way to backup data without using a super\-user, and to store
  1219. ACLs from incompatible systems.
  1220. .IP
  1221. The \fB\-\-fake\-super\fP option only affects the side where the option is used.
  1222. To affect the remote side of a remote\-shell connection, specify an rsync
  1223. path:
  1224. .IP
  1225. .RS
  1226. \f(CW rsync \-av \-\-rsync\-path=\(dq\&rsync \-\-fake\-super\(dq\& /src/ host:/dest/\fP
  1227. .RE
  1228. .IP
  1229. Since there is only one \(dq\&side\(dq\& in a local copy, this option affects both
  1230. the sending and receiving of files. You\(cq\&ll need to specify a copy using
  1231. \(dq\&localhost\(dq\& if you need to avoid this, possibly using the \(dq\&lsh\(dq\& shell
  1232. script (from the support directory) as a substitute for an actual remote
  1233. shell (see \fB\-\-rsh\fP).
  1234. .IP
  1235. This option is overridden by both \fB\-\-super\fP and \fB\-\-no\-super\fP.
  1236. .IP
  1237. See also the \(dq\&fake super\(dq\& setting in the daemon\(cq\&s rsyncd.conf file.
  1238. .IP
  1239. .IP "\fB\-S, \-\-sparse\fP"
  1240. Try to handle sparse files efficiently so they take
  1241. up less space on the destination. Conflicts with \fB\-\-inplace\fP because it\(cq\&s
  1242. not possible to overwrite data in a sparse fashion.
  1243. .IP
  1244. .IP "\fB\-n, \-\-dry\-run\fP"
  1245. This makes rsync perform a trial run that doesn\(cq\&t
  1246. make any changes (and produces mostly the same output as a real run). It
  1247. is most commonly used in combination with the \fB\-v, \-\-verbose\fP and/or
  1248. \fB\-i, \-\-itemize\-changes\fP options to see what an rsync command is going
  1249. to do before one actually runs it.
  1250. .IP
  1251. The output of \fB\-\-itemize\-changes\fP is supposed to be exactly the same on a
  1252. dry run and a subsequent real run (barring intentional trickery and system
  1253. call failures); if it isn\(cq\&t, that\(cq\&s a bug. Other output should be mostly
  1254. unchanged, but may differ in some areas. Notably, a dry run does not
  1255. send the actual data for file transfers, so \fB\-\-progress\fP has no effect,
  1256. the \(dq\&bytes sent\(dq\&, \(dq\&bytes received\(dq\&, \(dq\&literal data\(dq\&, and \(dq\&matched data\(dq\&
  1257. statistics are too small, and the \(dq\&speedup\(dq\& value is equivalent to a run
  1258. where no file transfers were needed.
  1259. .IP
  1260. .IP "\fB\-W, \-\-whole\-file\fP"
  1261. With this option rsync\(cq\&s delta\-transfer algorithm
  1262. is not used and the whole file is sent as\-is instead. The transfer may be
  1263. faster if this option is used when the bandwidth between the source and
  1264. destination machines is higher than the bandwidth to disk (especially when the
  1265. \(dq\&disk\(dq\& is actually a networked filesystem). This is the default when both
  1266. the source and destination are specified as local paths, but only if no
  1267. batch\-writing option is in effect.
  1268. .IP
  1269. .IP "\fB\-x, \-\-one\-file\-system\fP"
  1270. This tells rsync to avoid crossing a
  1271. filesystem boundary when recursing. This does not limit the user\(cq\&s ability
  1272. to specify items to copy from multiple filesystems, just rsync\(cq\&s recursion
  1273. through the hierarchy of each directory that the user specified, and also
  1274. the analogous recursion on the receiving side during deletion. Also keep
  1275. in mind that rsync treats a \(dq\&bind\(dq\& mount to the same device as being on the
  1276. same filesystem.
  1277. .IP
  1278. If this option is repeated, rsync omits all mount\-point directories from
  1279. the copy. Otherwise, it includes an empty directory at each mount\-point it
  1280. encounters (using the attributes of the mounted directory because those of
  1281. the underlying mount\-point directory are inaccessible).
  1282. .IP
  1283. If rsync has been told to collapse symlinks (via \fB\-\-copy\-links\fP or
  1284. \fB\-\-copy\-unsafe\-links\fP), a symlink to a directory on another device is
  1285. treated like a mount\-point. Symlinks to non\-directories are unaffected
  1286. by this option.
  1287. .IP
  1288. .IP "\fB\-\-existing, \-\-ignore\-non\-existing\fP"
  1289. This tells rsync to skip
  1290. creating files (including directories) that do not exist
  1291. yet on the destination. If this option is
  1292. combined with the \fB\-\-ignore\-existing\fP option, no files will be updated
  1293. (which can be useful if all you want to do is delete extraneous files).
  1294. .IP
  1295. This option is a transfer rule, not an exclude, so it doesn\(cq\&t affect the
  1296. data that goes into the file\-lists, and thus it doesn\(cq\&t affect deletions.
  1297. It just limits the files that the receiver requests to be transferred.
  1298. .IP
  1299. .IP "\fB\-\-ignore\-existing\fP"
  1300. This tells rsync to skip updating files that
  1301. already exist on the destination (this does \fInot\fP ignore existing
  1302. directories, or nothing would get done). See also \fB\-\-existing\fP.
  1303. .IP
  1304. This option is a transfer rule, not an exclude, so it doesn\(cq\&t affect the
  1305. data that goes into the file\-lists, and thus it doesn\(cq\&t affect deletions.
  1306. It just limits the files that the receiver requests to be transferred.
  1307. .IP
  1308. This option can be useful for those doing backups using the \fB\-\-link\-dest\fP
  1309. option when they need to continue a backup run that got interrupted. Since
  1310. a \fB\-\-link\-dest\fP run is copied into a new directory hierarchy (when it is
  1311. used properly), using \fB\-\-ignore existing\fP will ensure that the
  1312. already\-handled files don\(cq\&t get tweaked (which avoids a change in
  1313. permissions on the hard\-linked files). This does mean that this option
  1314. is only looking at the existing files in the destination hierarchy itself.
  1315. .IP
  1316. .IP "\fB\-\-remove\-source\-files\fP"
  1317. This tells rsync to remove from the sending
  1318. side the files (meaning non\-directories) that are a part of the transfer
  1319. and have been successfully duplicated on the receiving side.
  1320. .IP
  1321. Note that you should only use this option on source files that are quiescent.
  1322. If you are using this to move files that show up in a particular directory over
  1323. to another host, make sure that the finished files get renamed into the source
  1324. directory, not directly written into it, so that rsync can\(cq\&t possibly transfer
  1325. a file that is not yet fully written. If you can\(cq\&t first write the files into
  1326. a different directory, you should use a naming idiom that lets rsync avoid
  1327. transferring files that are not yet finished (e.g. name the file \(dq\&foo.new\(dq\& when
  1328. it is written, rename it to \(dq\&foo\(dq\& when it is done, and then use the option
  1329. \fB\-\-exclude='\&*.new'\&\fP for the rsync transfer).
  1330. .IP
  1331. .IP "\fB\-\-delete\fP"
  1332. This tells rsync to delete extraneous files from the
  1333. receiving side (ones that aren\(cq\&t on the sending side), but only for the
  1334. directories that are being synchronized. You must have asked rsync to
  1335. send the whole directory (e.g. \(dq\&dir\(dq\& or \(dq\&dir/\(dq\&) without using a wildcard
  1336. for the directory\(cq\&s contents (e.g. \(dq\&dir/*\(dq\&) since the wildcard is expanded
  1337. by the shell and rsync thus gets a request to transfer individual files, not
  1338. the files\(cq\& parent directory. Files that are excluded from the transfer are
  1339. also excluded from being deleted unless you use the \fB\-\-delete\-excluded\fP
  1340. option or mark the rules as only matching on the sending side (see the
  1341. include/exclude modifiers in the FILTER RULES section).
  1342. .IP
  1343. Prior to rsync 2.6.7, this option would have no effect unless \fB\-\-recursive\fP
  1344. was enabled. Beginning with 2.6.7, deletions will also occur when \fB\-\-dirs\fP
  1345. (\fB\-d\fP) is enabled, but only for directories whose contents are being copied.
  1346. .IP
  1347. This option can be dangerous if used incorrectly! It is a very good idea to
  1348. first try a run using the \fB\-\-dry\-run\fP option (\fB\-n\fP) to see what files are
  1349. going to be deleted.
  1350. .IP
  1351. If the sending side detects any I/O errors, then the deletion of any
  1352. files at the destination will be automatically disabled. This is to
  1353. prevent temporary filesystem failures (such as NFS errors) on the
  1354. sending side from causing a massive deletion of files on the
  1355. destination. You can override this with the \fB\-\-ignore\-errors\fP option.
  1356. .IP
  1357. The \fB\-\-delete\fP option may be combined with one of the \-\-delete\-WHEN options
  1358. without conflict, as well as \fB\-\-delete\-excluded\fP. However, if none of the
  1359. \-\-delete\-WHEN options are specified, rsync will choose the
  1360. \fB\-\-delete\-during\fP algorithm when talking to rsync 3.0.0 or newer, and
  1361. the \fB\-\-delete\-before\fP algorithm when talking to an older rsync. See also
  1362. \fB\-\-delete\-delay\fP and \fB\-\-delete\-after\fP.
  1363. .IP
  1364. .IP "\fB\-\-delete\-before\fP"
  1365. Request that the file\-deletions on the receiving
  1366. side be done before the transfer starts.
  1367. See \fB\-\-delete\fP (which is implied) for more details on file\-deletion.
  1368. .IP
  1369. Deleting before the transfer is helpful if the filesystem is tight for space
  1370. and removing extraneous files would help to make the transfer possible.
  1371. However, it does introduce a delay before the start of the transfer,
  1372. and this delay might cause the transfer to timeout (if \fB\-\-timeout\fP was
  1373. specified). It also forces rsync to use the old, non\-incremental recursion
  1374. algorithm that requires rsync to scan all the files in the transfer into
  1375. memory at once (see \fB\-\-recursive\fP).
  1376. .IP
  1377. .IP "\fB\-\-delete\-during, \-\-del\fP"
  1378. Request that the file\-deletions on the
  1379. receiving side be done incrementally as the transfer happens. The
  1380. per\-directory delete scan is done right before each directory is checked
  1381. for updates, so it behaves like a more efficient \fB\-\-delete\-before\fP,
  1382. including doing the deletions prior to any per\-directory filter files
  1383. being updated. This option was first added in rsync version 2.6.4.
  1384. See \fB\-\-delete\fP (which is implied) for more details on file\-deletion.
  1385. .IP
  1386. .IP "\fB\-\-delete\-delay\fP"
  1387. Request that the file\-deletions on the receiving
  1388. side be computed during the transfer (like \fB\-\-delete\-during\fP), and then
  1389. removed after the transfer completes. This is useful when combined with
  1390. \fB\-\-delay\-updates\fP and/or \fB\-\-fuzzy\fP, and is more efficient than using
  1391. \fB\-\-delete\-after\fP (but can behave differently, since \fB\-\-delete\-after\fP
  1392. computes the deletions in a separate pass after all updates are done).
  1393. If the number of removed files overflows an internal buffer, a
  1394. temporary file will be created on the receiving side to hold the names (it
  1395. is removed while open, so you shouldn\(cq\&t see it during the transfer). If
  1396. the creation of the temporary file fails, rsync will try to fall back to
  1397. using \fB\-\-delete\-after\fP (which it cannot do if \fB\-\-recursive\fP is doing an
  1398. incremental scan).
  1399. See \fB\-\-delete\fP (which is implied) for more details on file\-deletion.
  1400. .IP
  1401. .IP "\fB\-\-delete\-after\fP"
  1402. Request that the file\-deletions on the receiving
  1403. side be done after the transfer has completed. This is useful if you
  1404. are sending new per\-directory merge files as a part of the transfer and
  1405. you want their exclusions to take effect for the delete phase of the
  1406. current transfer. It also forces rsync to use the old, non\-incremental
  1407. recursion algorithm that requires rsync to scan all the files in the
  1408. transfer into memory at once (see \fB\-\-recursive\fP).
  1409. See \fB\-\-delete\fP (which is implied) for more details on file\-deletion.
  1410. .IP
  1411. .IP "\fB\-\-delete\-excluded\fP"
  1412. In addition to deleting the files on the
  1413. receiving side that are not on the sending side, this tells rsync to also
  1414. delete any files on the receiving side that are excluded (see \fB\-\-exclude\fP).
  1415. See the FILTER RULES section for a way to make individual exclusions behave
  1416. this way on the receiver, and for a way to protect files from
  1417. \fB\-\-delete\-excluded\fP.
  1418. See \fB\-\-delete\fP (which is implied) for more details on file\-deletion.
  1419. .IP
  1420. .IP "\fB\-\-ignore\-errors\fP"
  1421. Tells \fB\-\-delete\fP to go ahead and delete files
  1422. even when there are I/O errors.
  1423. .IP
  1424. .IP "\fB\-\-force\fP"
  1425. This option tells rsync to delete a non\-empty directory
  1426. when it is to be replaced by a non\-directory. This is only relevant if
  1427. deletions are not active (see \fB\-\-delete\fP for details).
  1428. .IP
  1429. Note for older rsync versions: \fB\-\-force\fP used to still be required when
  1430. using \fB\-\-delete\-after\fP, and it used to be non\-functional unless the
  1431. \fB\-\-recursive\fP option was also enabled.
  1432. .IP
  1433. .IP "\fB\-\-max\-delete=NUM\fP"
  1434. This tells rsync not to delete more than NUM
  1435. files or directories. If that limit is exceeded, a warning is output
  1436. and rsync exits with an error code of 25 (new for 3.0.0).
  1437. .IP
  1438. Also new for version 3.0.0, you may specify \fB\-\-max\-delete=0\fP to be warned
  1439. about any extraneous files in the destination without removing any of them.
  1440. Older clients interpreted this as \(dq\&unlimited\(dq\&, so if you don\(cq\&t know what
  1441. version the client is, you can use the less obvious \fB\-\-max\-delete=\-1\fP as
  1442. a backward\-compatible way to specify that no deletions be allowed (though
  1443. older versions didn\(cq\&t warn when the limit was exceeded).
  1444. .IP
  1445. .IP "\fB\-\-max\-size=SIZE\fP"
  1446. This tells rsync to avoid transferring any
  1447. file that is larger than the specified SIZE. The SIZE value can be
  1448. suffixed with a string to indicate a size multiplier, and
  1449. may be a fractional value (e.g. \(dq\&\fB\-\-max\-size=1.5m\fP\(dq\&).
  1450. .IP
  1451. This option is a transfer rule, not an exclude, so it doesn\(cq\&t affect the
  1452. data that goes into the file\-lists, and thus it doesn\(cq\&t affect deletions.
  1453. It just limits the files that the receiver requests to be transferred.
  1454. .IP
  1455. The suffixes are as follows: \(dq\&K\(dq\& (or \(dq\&KiB\(dq\&) is a kibibyte (1024),
  1456. \(dq\&M\(dq\& (or \(dq\&MiB\(dq\&) is a mebibyte (1024*1024), and \(dq\&G\(dq\& (or \(dq\&GiB\(dq\&) is a
  1457. gibibyte (1024*1024*1024).
  1458. If you want the multiplier to be 1000 instead of 1024, use \(dq\&KB\(dq\&,
  1459. \(dq\&MB\(dq\&, or \(dq\&GB\(dq\&. (Note: lower\-case is also accepted for all values.)
  1460. Finally, if the suffix ends in either \(dq\&+1\(dq\& or \(dq\&\-1\(dq\&, the value will
  1461. be offset by one byte in the indicated direction.
  1462. .IP
  1463. Examples: \-\-max\-size=1.5mb\-1 is 1499999 bytes, and \-\-max\-size=2g+1 is
  1464. 2147483649 bytes.
  1465. .IP
  1466. .IP "\fB\-\-min\-size=SIZE\fP"
  1467. This tells rsync to avoid transferring any
  1468. file that is smaller than the specified SIZE, which can help in not
  1469. transferring small, junk files.
  1470. See the \fB\-\-max\-size\fP option for a description of SIZE and other information.
  1471. .IP
  1472. .IP "\fB\-B, \-\-block\-size=BLOCKSIZE\fP"
  1473. This forces the block size used in
  1474. rsync\(cq\&s delta\-transfer algorithm to a fixed value. It is normally selected based on
  1475. the size of each file being updated. See the technical report for details.
  1476. .IP
  1477. .IP "\fB\-e, \-\-rsh=COMMAND\fP"
  1478. This option allows you to choose an alternative
  1479. remote shell program to use for communication between the local and
  1480. remote copies of rsync. Typically, rsync is configured to use ssh by
  1481. default, but you may prefer to use rsh on a local network.
  1482. .IP
  1483. If this option is used with \fB[user@]host::module/path\fP, then the
  1484. remote shell \fICOMMAND\fP will be used to run an rsync daemon on the
  1485. remote host, and all data will be transmitted through that remote
  1486. shell connection, rather than through a direct socket connection to a
  1487. running rsync daemon on the remote host. See the section \(dq\&USING
  1488. RSYNC\-DAEMON FEATURES VIA A REMOTE\-SHELL CONNECTION\(dq\& above.
  1489. .IP
  1490. Command\-line arguments are permitted in COMMAND provided that COMMAND is
  1491. presented to rsync as a single argument. You must use spaces (not tabs
  1492. or other whitespace) to separate the command and args from each other,
  1493. and you can use single\- and/or double\-quotes to preserve spaces in an
  1494. argument (but not backslashes). Note that doubling a single\-quote
  1495. inside a single\-quoted string gives you a single\-quote; likewise for
  1496. double\-quotes (though you need to pay attention to which quotes your
  1497. shell is parsing and which quotes rsync is parsing). Some examples:
  1498. .IP
  1499. .RS
  1500. \f(CW \-e '\&ssh \-p 2234'\&\fP
  1501. .br
  1502. \f(CW \-e '\&ssh \-o \(dq\&ProxyCommand nohup ssh firewall nc \-w1 %h %p\(dq\&'\&\fP
  1503. .br
  1504. .RE
  1505. .IP
  1506. (Note that ssh users can alternately customize site\-specific connect
  1507. options in their .ssh/config file.)
  1508. .IP
  1509. You can also choose the remote shell program using the RSYNC_RSH
  1510. environment variable, which accepts the same range of values as \fB\-e\fP.
  1511. .IP
  1512. See also the \fB\-\-blocking\-io\fP option which is affected by this option.
  1513. .IP
  1514. .IP "\fB\-\-rsync\-path=PROGRAM\fP"
  1515. Use this to specify what program is to be run
  1516. on the remote machine to start\-up rsync. Often used when rsync is not in
  1517. the default remote\-shell\(cq\&s path (e.g. \-\-rsync\-path=/usr/local/bin/rsync).
  1518. Note that PROGRAM is run with the help of a shell, so it can be any
  1519. program, script, or command sequence you\(cq\&d care to run, so long as it does
  1520. not corrupt the standard\-in & standard\-out that rsync is using to
  1521. communicate.
  1522. .IP
  1523. One tricky example is to set a different default directory on the remote
  1524. machine for use with the \fB\-\-relative\fP option. For instance:
  1525. .IP
  1526. .RS
  1527. \f(CW rsync \-avR \-\-rsync\-path=\(dq\&cd /a/b && rsync\(dq\& host:c/d /e/\fP
  1528. .RE
  1529. .IP
  1530. .IP "\fB\-C, \-\-cvs\-exclude\fP"
  1531. This is a useful shorthand for excluding a
  1532. broad range of files that you often don\(cq\&t want to transfer between
  1533. systems. It uses a similar algorithm to CVS to determine if
  1534. a file should be ignored.
  1535. .IP
  1536. The exclude list is initialized to exclude the following items (these
  1537. initial items are marked as perishable \-\- see the FILTER RULES section):
  1538. .IP
  1539. .RS
  1540. .RS
  1541. \f(CWRCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state
  1542. \&.nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del\-*
  1543. *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .hg/ .bzr/\fP
  1544. .RE
  1545. .RE
  1546. .IP
  1547. then, files listed in a $HOME/.cvsignore are added to the list and any
  1548. files listed in the CVSIGNORE environment variable (all cvsignore names
  1549. are delimited by whitespace).
  1550. .IP
  1551. Finally, any file is ignored if it is in the same directory as a
  1552. \&.cvsignore file and matches one of the patterns listed therein. Unlike
  1553. rsync\(cq\&s filter/exclude files, these patterns are split on whitespace.
  1554. See the \fBcvs\fP(1) manual for more information.
  1555. .IP
  1556. If you\(cq\&re combining \fB\-C\fP with your own \fB\-\-filter\fP rules, you should
  1557. note that these CVS excludes are appended at the end of your own rules,
  1558. regardless of where the \fB\-C\fP was placed on the command\-line. This makes them
  1559. a lower priority than any rules you specified explicitly. If you want to
  1560. control where these CVS excludes get inserted into your filter rules, you
  1561. should omit the \fB\-C\fP as a command\-line option and use a combination of
  1562. \fB\-\-filter=:C\fP and \fB\-\-filter=\-C\fP (either on your command\-line or by
  1563. putting the \(dq\&:C\(dq\& and \(dq\&\-C\(dq\& rules into a filter file with your other rules).
  1564. The first option turns on the per\-directory scanning for the .cvsignore
  1565. file. The second option does a one\-time import of the CVS excludes
  1566. mentioned above.
  1567. .IP
  1568. .IP "\fB\-f, \-\-filter=RULE\fP"
  1569. This option allows you to add rules to selectively
  1570. exclude certain files from the list of files to be transferred. This is
  1571. most useful in combination with a recursive transfer.
  1572. .IP
  1573. You may use as many \fB\-\-filter\fP options on the command line as you like
  1574. to build up the list of files to exclude. If the filter contains whitespace,
  1575. be sure to quote it so that the shell gives the rule to rsync as a single
  1576. argument. The text below also mentions that you can use an underscore to
  1577. replace the space that separates a rule from its arg.
  1578. .IP
  1579. See the FILTER RULES section for detailed information on this option.
  1580. .IP
  1581. .IP "\fB\-F\fP"
  1582. The \fB\-F\fP option is a shorthand for adding two \fB\-\-filter\fP rules to
  1583. your command. The first time it is used is a shorthand for this rule:
  1584. .IP
  1585. .RS
  1586. \f(CW \-\-filter='\&dir\-merge /.rsync\-filter'\&\fP
  1587. .RE
  1588. .IP
  1589. This tells rsync to look for per\-directory .rsync\-filter files that have
  1590. been sprinkled through the hierarchy and use their rules to filter the
  1591. files in the transfer. If \fB\-F\fP is repeated, it is a shorthand for this
  1592. rule:
  1593. .IP
  1594. .RS
  1595. \f(CW \-\-filter='\&exclude .rsync\-filter'\&\fP
  1596. .RE
  1597. .IP
  1598. This filters out the .rsync\-filter files themselves from the transfer.
  1599. .IP
  1600. See the FILTER RULES section for detailed information on how these options
  1601. work.
  1602. .IP
  1603. .IP "\fB\-\-exclude=PATTERN\fP"
  1604. This option is a simplified form of the
  1605. \fB\-\-filter\fP option that defaults to an exclude rule and does not allow
  1606. the full rule\-parsing syntax of normal filter rules.
  1607. .IP
  1608. See the FILTER RULES section for detailed information on this option.
  1609. .IP
  1610. .IP "\fB\-\-exclude\-from=FILE\fP"
  1611. This option is related to the \fB\-\-exclude\fP
  1612. option, but it specifies a FILE that contains exclude patterns (one per line).
  1613. Blank lines in the file and lines starting with \(cq\&;\(cq\& or \(cq\&#\(cq\& are ignored.
  1614. If \fIFILE\fP is \fB\-\fP, the list will be read from standard input.
  1615. .IP
  1616. .IP "\fB\-\-include=PATTERN\fP"
  1617. This option is a simplified form of the
  1618. \fB\-\-filter\fP option that defaults to an include rule and does not allow
  1619. the full rule\-parsing syntax of normal filter rules.
  1620. .IP
  1621. See the FILTER RULES section for detailed information on this option.
  1622. .IP
  1623. .IP "\fB\-\-include\-from=FILE\fP"
  1624. This option is related to the \fB\-\-include\fP
  1625. option, but it specifies a FILE that contains include patterns (one per line).
  1626. Blank lines in the file and lines starting with \(cq\&;\(cq\& or \(cq\&#\(cq\& are ignored.
  1627. If \fIFILE\fP is \fB\-\fP, the list will be read from standard input.
  1628. .IP
  1629. .IP "\fB\-\-files\-from=FILE\fP"
  1630. Using this option allows you to specify the
  1631. exact list of files to transfer (as read from the specified FILE or \fB\-\fP
  1632. for standard input). It also tweaks the default behavior of rsync to make
  1633. transferring just the specified files and directories easier:
  1634. .IP
  1635. .RS
  1636. .IP o
  1637. The \fB\-\-relative\fP (\fB\-R\fP) option is implied, which preserves the path
  1638. information that is specified for each item in the file (use
  1639. \fB\-\-no\-relative\fP or \fB\-\-no\-R\fP if you want to turn that off).
  1640. .IP o
  1641. The \fB\-\-dirs\fP (\fB\-d\fP) option is implied, which will create directories
  1642. specified in the list on the destination rather than noisily skipping
  1643. them (use \fB\-\-no\-dirs\fP or \fB\-\-no\-d\fP if you want to turn that off).
  1644. .IP o
  1645. The \fB\-\-archive\fP (\fB\-a\fP) option\(cq\&s behavior does not imply \fB\-\-recursive\fP
  1646. (\fB\-r\fP), so specify it explicitly, if you want it.
  1647. .IP o
  1648. These side\-effects change the default state of rsync, so the position
  1649. of the \fB\-\-files\-from\fP option on the command\-line has no bearing on how
  1650. other options are parsed (e.g. \fB\-a\fP works the same before or after
  1651. \fB\-\-files\-from\fP, as does \fB\-\-no\-R\fP and all other options).
  1652. .RE
  1653. .IP
  1654. The filenames that are read from the FILE are all relative to the
  1655. source dir \-\- any leading slashes are removed and no \(dq\&..\(dq\& references are
  1656. allowed to go higher than the source dir. For example, take this
  1657. command:
  1658. .IP
  1659. .RS
  1660. \f(CW rsync \-a \-\-files\-from=/tmp/foo /usr remote:/backup\fP
  1661. .RE
  1662. .IP
  1663. If /tmp/foo contains the string \(dq\&bin\(dq\& (or even \(dq\&/bin\(dq\&), the /usr/bin
  1664. directory will be created as /backup/bin on the remote host. If it
  1665. contains \(dq\&bin/\(dq\& (note the trailing slash), the immediate contents of
  1666. the directory would also be sent (without needing to be explicitly
  1667. mentioned in the file \-\- this began in version 2.6.4). In both cases,
  1668. if the \fB\-r\fP option was enabled, that dir\(cq\&s entire hierarchy would
  1669. also be transferred (keep in mind that \fB\-r\fP needs to be specified
  1670. explicitly with \fB\-\-files\-from\fP, since it is not implied by \fB\-a\fP).
  1671. Also note
  1672. that the effect of the (enabled by default) \fB\-\-relative\fP option is to
  1673. duplicate only the path info that is read from the file \-\- it does not
  1674. force the duplication of the source\-spec path (/usr in this case).
  1675. .IP
  1676. In addition, the \fB\-\-files\-from\fP file can be read from the remote host
  1677. instead of the local host if you specify a \(dq\&host:\(dq\& in front of the file
  1678. (the host must match one end of the transfer). As a short\-cut, you can
  1679. specify just a prefix of \(dq\&:\(dq\& to mean \(dq\&use the remote end of the
  1680. transfer\(dq\&. For example:
  1681. .IP
  1682. .RS
  1683. \f(CW rsync \-a \-\-files\-from=:/path/file\-list src:/ /tmp/copy\fP
  1684. .RE
  1685. .IP
  1686. This would copy all the files specified in the /path/file\-list file that
  1687. was located on the remote \(dq\&src\(dq\& host.
  1688. .IP
  1689. If the \fB\-\-iconv\fP and \fB\-\-protect\-args\fP options are specified and the
  1690. \fB\-\-files\-from\fP filenames are being sent from one host to another, the
  1691. filenames will be translated from the sending host\(cq\&s charset to the
  1692. receiving host\(cq\&s charset.
  1693. .IP
  1694. NOTE: sorting the list of files in the \-\-files\-from input helps rsync to be
  1695. more efficient, as it will avoid re\-visiting the path elements that are shared
  1696. between adjacent entries. If the input is not sorted, some path elements
  1697. (implied directories) may end up being scanned multiple times, and rsync will
  1698. eventually unduplicate them after they get turned into file\-list elements.
  1699. .IP
  1700. .IP "\fB\-0, \-\-from0\fP"
  1701. This tells rsync that the rules/filenames it reads from a
  1702. file are terminated by a null (\(cq\&\e0\(cq\&) character, not a NL, CR, or CR+LF.
  1703. This affects \fB\-\-exclude\-from\fP, \fB\-\-include\-from\fP, \fB\-\-files\-from\fP, and any
  1704. merged files specified in a \fB\-\-filter\fP rule.
  1705. It does not affect \fB\-\-cvs\-exclude\fP (since all names read from a .cvsignore
  1706. file are split on whitespace).
  1707. .IP
  1708. .IP "\fB\-s, \-\-protect\-args\fP"
  1709. This option sends all filenames and most options to
  1710. the remote rsync without allowing the remote shell to interpret them. This
  1711. means that spaces are not split in names, and any non\-wildcard special
  1712. characters are not translated (such as ~, $, ;, &, etc.). Wildcards are
  1713. expanded on the remote host by rsync (instead of the shell doing it).
  1714. .IP
  1715. If you use this option with \fB\-\-iconv\fP, the args related to the remote
  1716. side will also be translated
  1717. from the local to the remote character\-set. The translation happens before
  1718. wild\-cards are expanded. See also the \fB\-\-files\-from\fP option.
  1719. .IP
  1720. .IP "\fB\-T, \-\-temp\-dir=DIR\fP"
  1721. This option instructs rsync to use DIR as a
  1722. scratch directory when creating temporary copies of the files transferred
  1723. on the receiving side. The default behavior is to create each temporary
  1724. file in the same directory as the associated destination file.
  1725. .IP
  1726. This option is most often used when the receiving disk partition does not
  1727. have enough free space to hold a copy of the largest file in the transfer.
  1728. In this case (i.e. when the scratch directory is on a different disk
  1729. partition), rsync will not be able to rename each received temporary file
  1730. over the top of the associated destination file, but instead must copy it
  1731. into place. Rsync does this by copying the file over the top of the
  1732. destination file, which means that the destination file will contain
  1733. truncated data during this copy. If this were not done this way (even if
  1734. the destination file were first removed, the data locally copied to a
  1735. temporary file in the destination directory, and then renamed into place)
  1736. it would be possible for the old file to continue taking up disk space (if
  1737. someone had it open), and thus there might not be enough room to fit the
  1738. new version on the disk at the same time.
  1739. .IP
  1740. If you are using this option for reasons other than a shortage of disk
  1741. space, you may wish to combine it with the \fB\-\-delay\-updates\fP option,
  1742. which will ensure that all copied files get put into subdirectories in the
  1743. destination hierarchy, awaiting the end of the transfer. If you don\(cq\&t
  1744. have enough room to duplicate all the arriving files on the destination
  1745. partition, another way to tell rsync that you aren\(cq\&t overly concerned
  1746. about disk space is to use the \fB\-\-partial\-dir\fP option with a relative
  1747. path; because this tells rsync that it is OK to stash off a copy of a
  1748. single file in a subdir in the destination hierarchy, rsync will use the
  1749. partial\-dir as a staging area to bring over the copied file, and then
  1750. rename it into place from there. (Specifying a \fB\-\-partial\-dir\fP with
  1751. an absolute path does not have this side\-effect.)
  1752. .IP
  1753. .IP "\fB\-y, \-\-fuzzy\fP"
  1754. This option tells rsync that it should look for a
  1755. basis file for any destination file that is missing. The current algorithm
  1756. looks in the same directory as the destination file for either a file that
  1757. has an identical size and modified\-time, or a similarly\-named file. If
  1758. found, rsync uses the fuzzy basis file to try to speed up the transfer.
  1759. .IP
  1760. Note that the use of the \fB\-\-delete\fP option might get rid of any potential
  1761. fuzzy\-match files, so either use \fB\-\-delete\-after\fP or specify some
  1762. filename exclusions if you need to prevent this.
  1763. .IP
  1764. .IP "\fB\-\-compare\-dest=DIR\fP"
  1765. This option instructs rsync to use \fIDIR\fP on
  1766. the destination machine as an additional hierarchy to compare destination
  1767. files against doing transfers (if the files are missing in the destination
  1768. directory). If a file is found in \fIDIR\fP that is identical to the
  1769. sender\(cq\&s file, the file will NOT be transferred to the destination
  1770. directory. This is useful for creating a sparse backup of just files that
  1771. have changed from an earlier backup.
  1772. .IP
  1773. Beginning in version 2.6.4, multiple \fB\-\-compare\-dest\fP directories may be
  1774. provided, which will cause rsync to search the list in the order specified
  1775. for an exact match.
  1776. If a match is found that differs only in attributes, a local copy is made
  1777. and the attributes updated.
  1778. If a match is not found, a basis file from one of the \fIDIR\fPs will be
  1779. selected to try to speed up the transfer.
  1780. .IP
  1781. If \fIDIR\fP is a relative path, it is relative to the destination directory.
  1782. See also \fB\-\-copy\-dest\fP and \fB\-\-link\-dest\fP.
  1783. .IP
  1784. .IP "\fB\-\-copy\-dest=DIR\fP"
  1785. This option behaves like \fB\-\-compare\-dest\fP, but
  1786. rsync will also copy unchanged files found in \fIDIR\fP to the destination
  1787. directory using a local copy.
  1788. This is useful for doing transfers to a new destination while leaving
  1789. existing files intact, and then doing a flash\-cutover when all files have
  1790. been successfully transferred.
  1791. .IP
  1792. Multiple \fB\-\-copy\-dest\fP directories may be provided, which will cause
  1793. rsync to search the list in the order specified for an unchanged file.
  1794. If a match is not found, a basis file from one of the \fIDIR\fPs will be
  1795. selected to try to speed up the transfer.
  1796. .IP
  1797. If \fIDIR\fP is a relative path, it is relative to the destination directory.
  1798. See also \fB\-\-compare\-dest\fP and \fB\-\-link\-dest\fP.
  1799. .IP
  1800. .IP "\fB\-\-link\-dest=DIR\fP"
  1801. This option behaves like \fB\-\-copy\-dest\fP, but
  1802. unchanged files are hard linked from \fIDIR\fP to the destination directory.
  1803. The files must be identical in all preserved attributes (e.g. permissions,
  1804. possibly ownership) in order for the files to be linked together.
  1805. An example:
  1806. .IP
  1807. .RS
  1808. \f(CW rsync \-av \-\-link\-dest=$PWD/prior_dir host:src_dir/ new_dir/\fP
  1809. .RE
  1810. .IP
  1811. If file\(cq\&s aren\(cq\&t linking, double\-check their attributes. Also check if some
  1812. attributes are getting forced outside of rsync\(cq\&s control, such a mount option
  1813. that squishes root to a single user, or mounts a removable drive with generic
  1814. ownership (such as OS X\(cq\&s \(dq\&Ignore ownership on this volume\(dq\& option).
  1815. .IP
  1816. Beginning in version 2.6.4, multiple \fB\-\-link\-dest\fP directories may be
  1817. provided, which will cause rsync to search the list in the order specified
  1818. for an exact match.
  1819. If a match is found that differs only in attributes, a local copy is made
  1820. and the attributes updated.
  1821. If a match is not found, a basis file from one of the \fIDIR\fPs will be
  1822. selected to try to speed up the transfer.
  1823. .IP
  1824. This option works best when copying into an empty destination hierarchy, as
  1825. rsync treats existing files as definitive (so it never looks in the link\-dest
  1826. dirs when a destination file already exists), and as malleable (so it might
  1827. change the attributes of a destination file, which affects all the hard\-linked
  1828. versions).
  1829. .IP
  1830. Note that if you combine this option with \fB\-\-ignore\-times\fP, rsync will not
  1831. link any files together because it only links identical files together as a
  1832. substitute for transferring the file, never as an additional check after the
  1833. file is updated.
  1834. .IP
  1835. If \fIDIR\fP is a relative path, it is relative to the destination directory.
  1836. See also \fB\-\-compare\-dest\fP and \fB\-\-copy\-dest\fP.
  1837. .IP
  1838. Note that rsync versions prior to 2.6.1 had a bug that could prevent
  1839. \fB\-\-link\-dest\fP from working properly for a non\-super\-user when \fB\-o\fP was
  1840. specified (or implied by \fB\-a\fP). You can work\-around this bug by avoiding
  1841. the \fB\-o\fP option when sending to an old rsync.
  1842. .IP
  1843. .IP "\fB\-z, \-\-compress\fP"
  1844. With this option, rsync compresses the file data
  1845. as it is sent to the destination machine, which reduces the amount of data
  1846. being transmitted \-\- something that is useful over a slow connection.
  1847. .IP
  1848. Note that this option typically achieves better compression ratios than can
  1849. be achieved by using a compressing remote shell or a compressing transport
  1850. because it takes advantage of the implicit information in the matching data
  1851. blocks that are not explicitly sent over the connection.
  1852. .IP
  1853. See the \fB\-\-skip\-compress\fP option for the default list of file suffixes
  1854. that will not be compressed.
  1855. .IP
  1856. .IP "\fB\-\-compress\-level=NUM\fP"
  1857. Explicitly set the compression level to use
  1858. (see \fB\-\-compress\fP) instead of letting it default. If NUM is non\-zero,
  1859. the \fB\-\-compress\fP option is implied.
  1860. .IP
  1861. .IP "\fB\-\-skip\-compress=LIST\fP"
  1862. Override the list of file suffixes that will
  1863. not be compressed. The \fBLIST\fP should be one or more file suffixes
  1864. (without the dot) separated by slashes (/).
  1865. .IP
  1866. You may specify an empty string to indicate that no file should be skipped.
  1867. .IP
  1868. Simple character\-class matching is supported: each must consist of a list
  1869. of letters inside the square brackets (e.g. no special classes, such as
  1870. \(dq\&[:alpha:]\(dq\&, are supported, and \(cq\&\-\(cq\& has no special meaning).
  1871. .IP
  1872. The characters asterisk (*) and question\-mark (?) have no special meaning.
  1873. .IP
  1874. Here\(cq\&s an example that specifies 6 suffixes to skip (since 1 of the 5 rules
  1875. matches 2 suffixes):
  1876. .IP
  1877. .nf
  1878. \-\-skip\-compress=gz/jpg/mp[34]/7z/bz2
  1879. .fi
  1880. .IP
  1881. The default list of suffixes that will not be compressed is this (in this
  1882. version of rsync):
  1883. .IP
  1884. \fB7z\fP
  1885. \fBavi\fP
  1886. \fBbz2\fP
  1887. \fBdeb\fP
  1888. \fBgz\fP
  1889. \fBiso\fP
  1890. \fBjpeg\fP
  1891. \fBjpg\fP
  1892. \fBmov\fP
  1893. \fBmp3\fP
  1894. \fBmp4\fP
  1895. \fBogg\fP
  1896. \fBrpm\fP
  1897. \fBtbz\fP
  1898. \fBtgz\fP
  1899. \fBz\fP
  1900. \fBzip\fP
  1901. .IP
  1902. This list will be replaced by your \fB\-\-skip\-compress\fP list in all but one
  1903. situation: a copy from a daemon rsync will add your skipped suffixes to
  1904. its list of non\-compressing files (and its list may be configured to a
  1905. different default).
  1906. .IP
  1907. .IP "\fB\-\-numeric\-ids\fP"
  1908. With this option rsync will transfer numeric group
  1909. and user IDs rather than using user and group names and mapping them
  1910. at both ends.
  1911. .IP
  1912. By default rsync will use the username and groupname to determine
  1913. what ownership to give files. The special uid 0 and the special group
  1914. 0 are never mapped via user/group names even if the \fB\-\-numeric\-ids\fP
  1915. option is not specified.
  1916. .IP
  1917. If a user or group has no name on the source system or it has no match
  1918. on the destination system, then the numeric ID
  1919. from the source system is used instead. See also the comments on the
  1920. \(dq\&use chroot\(dq\& setting in the rsyncd.conf manpage for information on how
  1921. the chroot setting affects rsync\(cq\&s ability to look up the names of the
  1922. users and groups and what you can do about it.
  1923. .IP
  1924. .IP "\fB\-\-timeout=TIMEOUT\fP"
  1925. This option allows you to set a maximum I/O
  1926. timeout in seconds. If no data is transferred for the specified time
  1927. then rsync will exit. The default is 0, which means no timeout.
  1928. .IP
  1929. .IP "\fB\-\-contimeout\fP"
  1930. This option allows you to set the amount of time
  1931. that rsync will wait for its connection to an rsync daemon to succeed.
  1932. If the timeout is reached, rsync exits with an error.
  1933. .IP
  1934. .IP "\fB\-\-address\fP"
  1935. By default rsync will bind to the wildcard address when
  1936. connecting to an rsync daemon. The \fB\-\-address\fP option allows you to
  1937. specify a specific IP address (or hostname) to bind to. See also this
  1938. option in the \fB\-\-daemon\fP mode section.
  1939. .IP
  1940. .IP "\fB\-\-port=PORT\fP"
  1941. This specifies an alternate TCP port number to use
  1942. rather than the default of 873. This is only needed if you are using the
  1943. double\-colon (::) syntax to connect with an rsync daemon (since the URL
  1944. syntax has a way to specify the port as a part of the URL). See also this
  1945. option in the \fB\-\-daemon\fP mode section.
  1946. .IP
  1947. .IP "\fB\-\-sockopts\fP"
  1948. This option can provide endless fun for people
  1949. who like to tune their systems to the utmost degree. You can set all
  1950. sorts of socket options which may make transfers faster (or
  1951. slower!). Read the man page for the
  1952. \f(CWsetsockopt()\fP
  1953. system call for
  1954. details on some of the options you may be able to set. By default no
  1955. special socket options are set. This only affects direct socket
  1956. connections to a remote rsync daemon. This option also exists in the
  1957. \fB\-\-daemon\fP mode section.
  1958. .IP
  1959. .IP "\fB\-\-blocking\-io\fP"
  1960. This tells rsync to use blocking I/O when launching
  1961. a remote shell transport. If the remote shell is either rsh or remsh,
  1962. rsync defaults to using
  1963. blocking I/O, otherwise it defaults to using non\-blocking I/O. (Note that
  1964. ssh prefers non\-blocking I/O.)
  1965. .IP
  1966. .IP "\fB\-i, \-\-itemize\-changes\fP"
  1967. Requests a simple itemized list of the
  1968. changes that are being made to each file, including attribute changes.
  1969. This is exactly the same as specifying \fB\-\-out\-format='\&%i %n%L'\&\fP.
  1970. If you repeat the option, unchanged files will also be output, but only
  1971. if the receiving rsync is at least version 2.6.7 (you can use \fB\-vv\fP
  1972. with older versions of rsync, but that also turns on the output of other
  1973. verbose messages).
  1974. .IP
  1975. The \(dq\&%i\(dq\& escape has a cryptic output that is 11 letters long. The general
  1976. format is like the string \fBYXcstpoguax\fP, where \fBY\fP is replaced by the
  1977. type of update being done, \fBX\fP is replaced by the file\-type, and the
  1978. other letters represent attributes that may be output if they are being
  1979. modified.
  1980. .IP
  1981. The update types that replace the \fBY\fP are as follows:
  1982. .IP
  1983. .RS
  1984. .IP o
  1985. A \fB<\fP means that a file is being transferred to the remote host
  1986. (sent).
  1987. .IP o
  1988. A \fB>\fP means that a file is being transferred to the local host
  1989. (received).
  1990. .IP o
  1991. A \fBc\fP means that a local change/creation is occurring for the item
  1992. (such as the creation of a directory or the changing of a symlink, etc.).
  1993. .IP o
  1994. A \fBh\fP means that the item is a hard link to another item (requires
  1995. \fB\-\-hard\-links\fP).
  1996. .IP o
  1997. A \fB.\fP means that the item is not being updated (though it might
  1998. have attributes that are being modified).
  1999. .IP o
  2000. A \fB*\fP means that the rest of the itemized\-output area contains
  2001. a message (e.g. \(dq\&deleting\(dq\&).
  2002. .RE
  2003. .IP
  2004. The file\-types that replace the \fBX\fP are: \fBf\fP for a file, a \fBd\fP for a
  2005. directory, an \fBL\fP for a symlink, a \fBD\fP for a device, and a \fBS\fP for a
  2006. special file (e.g. named sockets and fifos).
  2007. .IP
  2008. The other letters in the string above are the actual letters that
  2009. will be output if the associated attribute for the item is being updated or
  2010. a \(dq\&.\(dq\& for no change. Three exceptions to this are: (1) a newly created
  2011. item replaces each letter with a \(dq\&+\(dq\&, (2) an identical item replaces the
  2012. dots with spaces, and (3) an unknown attribute replaces each letter with
  2013. a \(dq\&?\(dq\& (this can happen when talking to an older rsync).
  2014. .IP
  2015. The attribute that is associated with each letter is as follows:
  2016. .IP
  2017. .RS
  2018. .IP o
  2019. A \fBc\fP means either that a regular file has a different checksum
  2020. (requires \fB\-\-checksum\fP) or that a symlink, device, or special file has
  2021. a changed value.
  2022. Note that if you are sending files to an rsync prior to 3.0.1, this
  2023. change flag will be present only for checksum\-differing regular files.
  2024. .IP o
  2025. A \fBs\fP means the size of a regular file is different and will be updated
  2026. by the file transfer.
  2027. .IP o
  2028. A \fBt\fP means the modification time is different and is being updated
  2029. to the sender\(cq\&s value (requires \fB\-\-times\fP). An alternate value of \fBT\fP
  2030. means that the modification time will be set to the transfer time, which happens
  2031. when a file/symlink/device is updated without \fB\-\-times\fP and when a
  2032. symlink is changed and the receiver can\(cq\&t set its time.
  2033. (Note: when using an rsync 3.0.0 client, you might see the \fBs\fP flag combined
  2034. with \fBt\fP instead of the proper \fBT\fP flag for this time\-setting failure.)
  2035. .IP o
  2036. A \fBp\fP means the permissions are different and are being updated to
  2037. the sender\(cq\&s value (requires \fB\-\-perms\fP).
  2038. .IP o
  2039. An \fBo\fP means the owner is different and is being updated to the
  2040. sender\(cq\&s value (requires \fB\-\-owner\fP and super\-user privileges).
  2041. .IP o
  2042. A \fBg\fP means the group is different and is being updated to the
  2043. sender\(cq\&s value (requires \fB\-\-group\fP and the authority to set the group).
  2044. .IP o
  2045. The \fBu\fP slot is reserved for future use.
  2046. .IP o
  2047. The \fBa\fP means that the ACL information changed.
  2048. .IP o
  2049. The \fBx\fP means that the extended attribute information changed.
  2050. .RE
  2051. .IP
  2052. One other output is possible: when deleting files, the \(dq\&%i\(dq\& will output
  2053. the string \(dq\&*deleting\(dq\& for each item that is being removed (assuming that
  2054. you are talking to a recent enough rsync that it logs deletions instead of
  2055. outputting them as a verbose message).
  2056. .IP
  2057. .IP "\fB\-\-out\-format=FORMAT\fP"
  2058. This allows you to specify exactly what the
  2059. rsync client outputs to the user on a per\-update basis. The format is a
  2060. text string containing embedded single\-character escape sequences prefixed
  2061. with a percent (%) character. A default format of \(dq\&%n%L\(dq\& is assumed if
  2062. \fB\-v\fP is specified (which reports the name
  2063. of the file and, if the item is a link, where it points). For a full list
  2064. of the possible escape characters, see the \(dq\&log format\(dq\& setting in the
  2065. rsyncd.conf manpage.
  2066. .IP
  2067. Specifying the \fB\-\-out\-format\fP option
  2068. will mention each file, dir, etc. that gets updated in a significant
  2069. way (a transferred file, a recreated symlink/device, or a touched
  2070. directory). In addition, if the itemize\-changes escape (%i) is included in
  2071. the string (e.g. if the \fB\-\-itemize\-changes\fP option was used), the logging
  2072. of names increases to mention any item that is changed in any way (as long
  2073. as the receiving side is at least 2.6.4). See the \fB\-\-itemize\-changes\fP
  2074. option for a description of the output of \(dq\&%i\(dq\&.
  2075. .IP
  2076. Rsync will output the out\-format string prior to a file\(cq\&s transfer unless
  2077. one of the transfer\-statistic escapes is requested, in which case the
  2078. logging is done at the end of the file\(cq\&s transfer. When this late logging
  2079. is in effect and \fB\-\-progress\fP is also specified, rsync will also output
  2080. the name of the file being transferred prior to its progress information
  2081. (followed, of course, by the out\-format output).
  2082. .IP
  2083. .IP "\fB\-\-log\-file=FILE\fP"
  2084. This option causes rsync to log what it is doing
  2085. to a file. This is similar to the logging that a daemon does, but can be
  2086. requested for the client side and/or the server side of a non\-daemon
  2087. transfer. If specified as a client option, transfer logging will be
  2088. enabled with a default format of \(dq\&%i %n%L\(dq\&. See the \fB\-\-log\-file\-format\fP
  2089. option if you wish to override this.
  2090. .IP
  2091. Here\(cq\&s a example command that requests the remote side to log what is
  2092. happening:
  2093. .IP
  2094. .nf
  2095. rsync \-av \-\-rsync\-path=\(dq\&rsync \-\-log\-file=/tmp/rlog\(dq\& src/ dest/
  2096. .fi
  2097. .IP
  2098. This is very useful if you need to debug why a connection is closing
  2099. unexpectedly.
  2100. .IP
  2101. .IP "\fB\-\-log\-file\-format=FORMAT\fP"
  2102. This allows you to specify exactly what
  2103. per\-update logging is put into the file specified by the \fB\-\-log\-file\fP option
  2104. (which must also be specified for this option to have any effect). If you
  2105. specify an empty string, updated files will not be mentioned in the log file.
  2106. For a list of the possible escape characters, see the \(dq\&log format\(dq\& setting
  2107. in the rsyncd.conf manpage.
  2108. .IP
  2109. The default FORMAT used if \fB\-\-log\-file\fP is specified and this option is not
  2110. is \(cq\&%i %n%L\(cq\&.
  2111. .IP
  2112. .IP "\fB\-\-stats\fP"
  2113. This tells rsync to print a verbose set of statistics
  2114. on the file transfer, allowing you to tell how effective rsync\(cq\&s delta\-transfer
  2115. algorithm is for your data.
  2116. .IP
  2117. The current statistics are as follows:
  2118. .RS
  2119. .IP o
  2120. \fBNumber of files\fP is the count of all \(dq\&files\(dq\& (in the generic
  2121. sense), which includes directories, symlinks, etc.
  2122. .IP o
  2123. \fBNumber of files transferred\fP is the count of normal files that
  2124. were updated via rsync\(cq\&s delta\-transfer algorithm, which does not include created
  2125. dirs, symlinks, etc.
  2126. .IP o
  2127. \fBTotal file size\fP is the total sum of all file sizes in the transfer.
  2128. This does not count any size for directories or special files, but does
  2129. include the size of symlinks.
  2130. .IP o
  2131. \fBTotal transferred file size\fP is the total sum of all files sizes
  2132. for just the transferred files.
  2133. .IP o
  2134. \fBLiteral data\fP is how much unmatched file\-update data we had to
  2135. send to the receiver for it to recreate the updated files.
  2136. .IP o
  2137. \fBMatched data\fP is how much data the receiver got locally when
  2138. recreating the updated files.
  2139. .IP o
  2140. \fBFile list size\fP is how big the file\-list data was when the sender
  2141. sent it to the receiver. This is smaller than the in\-memory size for the
  2142. file list due to some compressing of duplicated data when rsync sends the
  2143. list.
  2144. .IP o
  2145. \fBFile list generation time\fP is the number of seconds that the
  2146. sender spent creating the file list. This requires a modern rsync on the
  2147. sending side for this to be present.
  2148. .IP o
  2149. \fBFile list transfer time\fP is the number of seconds that the sender
  2150. spent sending the file list to the receiver.
  2151. .IP o
  2152. \fBTotal bytes sent\fP is the count of all the bytes that rsync sent
  2153. from the client side to the server side.
  2154. .IP o
  2155. \fBTotal bytes received\fP is the count of all non\-message bytes that
  2156. rsync received by the client side from the server side. \(dq\&Non\-message\(dq\&
  2157. bytes means that we don\(cq\&t count the bytes for a verbose message that the
  2158. server sent to us, which makes the stats more consistent.
  2159. .RE
  2160. .IP
  2161. .IP "\fB\-8, \-\-8\-bit\-output\fP"
  2162. This tells rsync to leave all high\-bit characters
  2163. unescaped in the output instead of trying to test them to see if they\(cq\&re
  2164. valid in the current locale and escaping the invalid ones. All control
  2165. characters (but never tabs) are always escaped, regardless of this option\(cq\&s
  2166. setting.
  2167. .IP
  2168. The escape idiom that started in 2.6.7 is to output a literal backslash (\e)
  2169. and a hash (#), followed by exactly 3 octal digits. For example, a newline
  2170. would output as \(dq\&\e#012\(dq\&. A literal backslash that is in a filename is not
  2171. escaped unless it is followed by a hash and 3 digits (0\-9).
  2172. .IP
  2173. .IP "\fB\-h, \-\-human\-readable\fP"
  2174. Output numbers in a more human\-readable format.
  2175. This makes big numbers output using larger units, with a K, M, or G suffix. If
  2176. this option was specified once, these units are K (1000), M (1000*1000), and
  2177. G (1000*1000*1000); if the option is repeated, the units are powers of 1024
  2178. instead of 1000.
  2179. .IP
  2180. .IP "\fB\-\-partial\fP"
  2181. By default, rsync will delete any partially
  2182. transferred file if the transfer is interrupted. In some circumstances
  2183. it is more desirable to keep partially transferred files. Using the
  2184. \fB\-\-partial\fP option tells rsync to keep the partial file which should
  2185. make a subsequent transfer of the rest of the file much faster.
  2186. .IP
  2187. .IP "\fB\-\-partial\-dir=DIR\fP"
  2188. A better way to keep partial files than the
  2189. \fB\-\-partial\fP option is to specify a \fIDIR\fP that will be used to hold the
  2190. partial data (instead of writing it out to the destination file).
  2191. On the next transfer, rsync will use a file found in this
  2192. dir as data to speed up the resumption of the transfer and then delete it
  2193. after it has served its purpose.
  2194. .IP
  2195. Note that if \fB\-\-whole\-file\fP is specified (or implied), any partial\-dir
  2196. file that is found for a file that is being updated will simply be removed
  2197. (since
  2198. rsync is sending files without using rsync\(cq\&s delta\-transfer algorithm).
  2199. .IP
  2200. Rsync will create the \fIDIR\fP if it is missing (just the last dir \-\- not
  2201. the whole path). This makes it easy to use a relative path (such as
  2202. \(dq\&\fB\-\-partial\-dir=.rsync\-partial\fP\(dq\&) to have rsync create the
  2203. partial\-directory in the destination file\(cq\&s directory when needed, and then
  2204. remove it again when the partial file is deleted.
  2205. .IP
  2206. If the partial\-dir value is not an absolute path, rsync will add an exclude
  2207. rule at the end of all your existing excludes. This will prevent the
  2208. sending of any partial\-dir files that may exist on the sending side, and
  2209. will also prevent the untimely deletion of partial\-dir items on the
  2210. receiving side. An example: the above \fB\-\-partial\-dir\fP option would add
  2211. the equivalent of \(dq\&\fB\-f '\&\-p .rsync\-partial/'\&\fP\(dq\& at the end of any other
  2212. filter rules.
  2213. .IP
  2214. If you are supplying your own exclude rules, you may need to add your own
  2215. exclude/hide/protect rule for the partial\-dir because (1) the auto\-added
  2216. rule may be ineffective at the end of your other rules, or (2) you may wish
  2217. to override rsync\(cq\&s exclude choice. For instance, if you want to make
  2218. rsync clean\-up any left\-over partial\-dirs that may be lying around, you
  2219. should specify \fB\-\-delete\-after\fP and add a \(dq\&risk\(dq\& filter rule, e.g.
  2220. \fB\-f '\&R .rsync\-partial/'\&\fP. (Avoid using \fB\-\-delete\-before\fP or
  2221. \fB\-\-delete\-during\fP unless you don\(cq\&t need rsync to use any of the
  2222. left\-over partial\-dir data during the current run.)
  2223. .IP
  2224. IMPORTANT: the \fB\-\-partial\-dir\fP should not be writable by other users or it
  2225. is a security risk. E.g. AVOID \(dq\&/tmp\(dq\&.
  2226. .IP
  2227. You can also set the partial\-dir value the RSYNC_PARTIAL_DIR environment
  2228. variable. Setting this in the environment does not force \fB\-\-partial\fP to be
  2229. enabled, but rather it affects where partial files go when \fB\-\-partial\fP is
  2230. specified. For instance, instead of using \fB\-\-partial\-dir=.rsync\-tmp\fP
  2231. along with \fB\-\-progress\fP, you could set RSYNC_PARTIAL_DIR=.rsync\-tmp in your
  2232. environment and then just use the \fB\-P\fP option to turn on the use of the
  2233. \&.rsync\-tmp dir for partial transfers. The only times that the \fB\-\-partial\fP
  2234. option does not look for this environment value are (1) when \fB\-\-inplace\fP was
  2235. specified (since \fB\-\-inplace\fP conflicts with \fB\-\-partial\-dir\fP), and (2) when
  2236. \fB\-\-delay\-updates\fP was specified (see below).
  2237. .IP
  2238. For the purposes of the daemon\-config\(cq\&s \(dq\&refuse options\(dq\& setting,
  2239. \fB\-\-partial\-dir\fP does \fInot\fP imply \fB\-\-partial\fP. This is so that a
  2240. refusal of the \fB\-\-partial\fP option can be used to disallow the overwriting
  2241. of destination files with a partial transfer, while still allowing the
  2242. safer idiom provided by \fB\-\-partial\-dir\fP.
  2243. .IP
  2244. .IP "\fB\-\-delay\-updates\fP"
  2245. This option puts the temporary file from each
  2246. updated file into a holding directory until the end of the
  2247. transfer, at which time all the files are renamed into place in rapid
  2248. succession. This attempts to make the updating of the files a little more
  2249. atomic. By default the files are placed into a directory named \(dq\&.~tmp~\(dq\& in
  2250. each file\(cq\&s destination directory, but if you\(cq\&ve specified the
  2251. \fB\-\-partial\-dir\fP option, that directory will be used instead. See the
  2252. comments in the \fB\-\-partial\-dir\fP section for a discussion of how this
  2253. \(dq\&.~tmp~\(dq\& dir will be excluded from the transfer, and what you can do if
  2254. you want rsync to cleanup old \(dq\&.~tmp~\(dq\& dirs that might be lying around.
  2255. Conflicts with \fB\-\-inplace\fP and \fB\-\-append\fP.
  2256. .IP
  2257. This option uses more memory on the receiving side (one bit per file
  2258. transferred) and also requires enough free disk space on the receiving
  2259. side to hold an additional copy of all the updated files. Note also that
  2260. you should not use an absolute path to \fB\-\-partial\-dir\fP unless (1)
  2261. there is no
  2262. chance of any of the files in the transfer having the same name (since all
  2263. the updated files will be put into a single directory if the path is
  2264. absolute)
  2265. and (2) there are no mount points in the hierarchy (since the
  2266. delayed updates will fail if they can\(cq\&t be renamed into place).
  2267. .IP
  2268. See also the \(dq\&atomic\-rsync\(dq\& perl script in the \(dq\&support\(dq\& subdir for an
  2269. update algorithm that is even more atomic (it uses \fB\-\-link\-dest\fP and a
  2270. parallel hierarchy of files).
  2271. .IP
  2272. .IP "\fB\-m, \-\-prune\-empty\-dirs\fP"
  2273. This option tells the receiving rsync to get
  2274. rid of empty directories from the file\-list, including nested directories
  2275. that have no non\-directory children. This is useful for avoiding the
  2276. creation of a bunch of useless directories when the sending rsync is
  2277. recursively scanning a hierarchy of files using include/exclude/filter
  2278. rules.
  2279. .IP
  2280. Note that the use of transfer rules, such as the \fB\-\-min\-size\fP option, does
  2281. not affect what goes into the file list, and thus does not leave directories
  2282. empty, even if none of the files in a directory match the transfer rule.
  2283. .IP
  2284. Because the file\-list is actually being pruned, this option also affects
  2285. what directories get deleted when a delete is active. However, keep in
  2286. mind that excluded files and directories can prevent existing items from
  2287. being deleted due to an exclude both hiding source files and protecting
  2288. destination files. See the perishable filter\-rule option for how to avoid
  2289. this.
  2290. .IP
  2291. You can prevent the pruning of certain empty directories from the file\-list
  2292. by using a global \(dq\&protect\(dq\& filter. For instance, this option would ensure
  2293. that the directory \(dq\&emptydir\(dq\& was kept in the file\-list:
  2294. .IP
  2295. .RS
  2296. \-\-filter \(cq\&protect emptydir/\(cq\&
  2297. .RE
  2298. .IP
  2299. Here\(cq\&s an example that copies all .pdf files in a hierarchy, only creating
  2300. the necessary destination directories to hold the .pdf files, and ensures
  2301. that any superfluous files and directories in the destination are removed
  2302. (note the hide filter of non\-directories being used instead of an exclude):
  2303. .IP
  2304. .RS
  2305. rsync \-avm \-\-del \-\-include=\(cq\&*.pdf\(cq\& \-f \(cq\&hide,! */\(cq\& src/ dest
  2306. .RE
  2307. .IP
  2308. If you didn\(cq\&t want to remove superfluous destination files, the more
  2309. time\-honored options of \(dq\&\fB\-\-include='\&*/'\& \-\-exclude='\&*'\&\fP\(dq\& would work fine
  2310. in place of the hide\-filter (if that is more natural to you).
  2311. .IP
  2312. .IP "\fB\-\-progress\fP"
  2313. This option tells rsync to print information
  2314. showing the progress of the transfer. This gives a bored user
  2315. something to watch.
  2316. Implies \fB\-\-verbose\fP if it wasn\(cq\&t already specified.
  2317. .IP
  2318. While rsync is transferring a regular file, it updates a progress line that
  2319. looks like this:
  2320. .IP
  2321. .nf
  2322. 782448 63% 110.64kB/s 0:00:04
  2323. .fi
  2324. .IP
  2325. In this example, the receiver has reconstructed 782448 bytes or 63% of the
  2326. sender\(cq\&s file, which is being reconstructed at a rate of 110.64 kilobytes
  2327. per second, and the transfer will finish in 4 seconds if the current rate
  2328. is maintained until the end.
  2329. .IP
  2330. These statistics can be misleading if rsync\(cq\&s delta\-transfer algorithm is
  2331. in use. For example, if the sender\(cq\&s file consists of the basis file
  2332. followed by additional data, the reported rate will probably drop
  2333. dramatically when the receiver gets to the literal data, and the transfer
  2334. will probably take much longer to finish than the receiver estimated as it
  2335. was finishing the matched part of the file.
  2336. .IP
  2337. When the file transfer finishes, rsync replaces the progress line with a
  2338. summary line that looks like this:
  2339. .IP
  2340. .nf
  2341. 1238099 100% 146.38kB/s 0:00:08 (xfer#5, to\-check=169/396)
  2342. .fi
  2343. .IP
  2344. In this example, the file was 1238099 bytes long in total, the average rate
  2345. of transfer for the whole file was 146.38 kilobytes per second over the 8
  2346. seconds that it took to complete, it was the 5th transfer of a regular file
  2347. during the current rsync session, and there are 169 more files for the
  2348. receiver to check (to see if they are up\-to\-date or not) remaining out of
  2349. the 396 total files in the file\-list.
  2350. .IP
  2351. .IP "\fB\-P\fP"
  2352. The \fB\-P\fP option is equivalent to \fB\-\-partial\fP \fB\-\-progress\fP. Its
  2353. purpose is to make it much easier to specify these two options for a long
  2354. transfer that may be interrupted.
  2355. .IP
  2356. .IP "\fB\-\-password\-file\fP"
  2357. This option allows you to provide a password in a
  2358. file for accessing an rsync daemon. The file must not be world readable.
  2359. It should contain just the password as the first line of the file (all
  2360. other lines are ignored).
  2361. .IP
  2362. This option does not supply a password to a remote shell transport such as
  2363. ssh; to learn how to do that, consult the remote shell\(cq\&s documentation.
  2364. When accessing an rsync daemon using a remote shell as the transport, this
  2365. option only comes into effect after the remote shell finishes its
  2366. authentication (i.e. if you have also specified a password in the daemon\(cq\&s
  2367. config file).
  2368. .IP
  2369. .IP "\fB\-\-list\-only\fP"
  2370. This option will cause the source files to be listed
  2371. instead of transferred. This option is inferred if there is a single source
  2372. arg and no destination specified, so its main uses are: (1) to turn a copy
  2373. command that includes a
  2374. destination arg into a file\-listing command, or (2) to be able to specify
  2375. more than one source arg (note: be sure to include the destination).
  2376. Caution: keep in mind that a source arg with a wild\-card is expanded by the
  2377. shell into multiple args, so it is never safe to try to list such an arg
  2378. without using this option. For example:
  2379. .IP
  2380. .nf
  2381. rsync \-av \-\-list\-only foo* dest/
  2382. .fi
  2383. .IP
  2384. Compatibility note: when requesting a remote listing of files from an rsync
  2385. that is version 2.6.3 or older, you may encounter an error if you ask for a
  2386. non\-recursive listing. This is because a file listing implies the \fB\-\-dirs\fP
  2387. option w/o \fB\-\-recursive\fP, and older rsyncs don\(cq\&t have that option. To
  2388. avoid this problem, either specify the \fB\-\-no\-dirs\fP option (if you don\(cq\&t
  2389. need to expand a directory\(cq\&s content), or turn on recursion and exclude
  2390. the content of subdirectories: \fB\-r \-\-exclude='\&/*/*'\&\fP.
  2391. .IP
  2392. .IP "\fB\-\-bwlimit=KBPS\fP"
  2393. This option allows you to specify a maximum
  2394. transfer rate in kilobytes per second. This option is most effective when
  2395. using rsync with large files (several megabytes and up). Due to the nature
  2396. of rsync transfers, blocks of data are sent, then if rsync determines the
  2397. transfer was too fast, it will wait before sending the next data block. The
  2398. result is an average transfer rate equaling the specified limit. A value
  2399. of zero specifies no limit.
  2400. .IP
  2401. .IP "\fB\-\-write\-batch=FILE\fP"
  2402. Record a file that can later be applied to
  2403. another identical destination with \fB\-\-read\-batch\fP. See the \(dq\&BATCH MODE\(dq\&
  2404. section for details, and also the \fB\-\-only\-write\-batch\fP option.
  2405. .IP
  2406. .IP "\fB\-\-only\-write\-batch=FILE\fP"
  2407. Works like \fB\-\-write\-batch\fP, except that
  2408. no updates are made on the destination system when creating the batch.
  2409. This lets you transport the changes to the destination system via some
  2410. other means and then apply the changes via \fB\-\-read\-batch\fP.
  2411. .IP
  2412. Note that you can feel free to write the batch directly to some portable
  2413. media: if this media fills to capacity before the end of the transfer, you
  2414. can just apply that partial transfer to the destination and repeat the
  2415. whole process to get the rest of the changes (as long as you don\(cq\&t mind a
  2416. partially updated destination system while the multi\-update cycle is
  2417. happening).
  2418. .IP
  2419. Also note that you only save bandwidth when pushing changes to a remote
  2420. system because this allows the batched data to be diverted from the sender
  2421. into the batch file without having to flow over the wire to the receiver
  2422. (when pulling, the sender is remote, and thus can\(cq\&t write the batch).
  2423. .IP
  2424. .IP "\fB\-\-read\-batch=FILE\fP"
  2425. Apply all of the changes stored in FILE, a
  2426. file previously generated by \fB\-\-write\-batch\fP.
  2427. If \fIFILE\fP is \fB\-\fP, the batch data will be read from standard input.
  2428. See the \(dq\&BATCH MODE\(dq\& section for details.
  2429. .IP
  2430. .IP "\fB\-\-protocol=NUM\fP"
  2431. Force an older protocol version to be used. This
  2432. is useful for creating a batch file that is compatible with an older
  2433. version of rsync. For instance, if rsync 2.6.4 is being used with the
  2434. \fB\-\-write\-batch\fP option, but rsync 2.6.3 is what will be used to run the
  2435. \fB\-\-read\-batch\fP option, you should use \(dq\&\-\-protocol=28\(dq\& when creating the
  2436. batch file to force the older protocol version to be used in the batch
  2437. file (assuming you can\(cq\&t upgrade the rsync on the reading system).
  2438. .IP
  2439. .IP "\fB\-\-iconv=CONVERT_SPEC\fP"
  2440. Rsync can convert filenames between character
  2441. sets using this option. Using a CONVERT_SPEC of \(dq\&.\(dq\& tells rsync to look up
  2442. the default character\-set via the locale setting. Alternately, you can
  2443. fully specify what conversion to do by giving a local and a remote charset
  2444. separated by a comma in the order \fB\-\-iconv=LOCAL,REMOTE\fP, e.g.
  2445. \fB\-\-iconv=utf8,iso88591\fP. This order ensures that the option
  2446. will stay the same whether you\(cq\&re pushing or pulling files.
  2447. Finally, you can specify either \fB\-\-no\-iconv\fP or a CONVERT_SPEC of \(dq\&\-\(dq\&
  2448. to turn off any conversion.
  2449. The default setting of this option is site\-specific, and can also be
  2450. affected via the RSYNC_ICONV environment variable.
  2451. .IP
  2452. For a list of what charset names your local iconv library supports, you can
  2453. run \(dq\&iconv \-\-list\(dq\&.
  2454. .IP
  2455. If you specify the \fB\-\-protect\-args\fP option (\fB\-s\fP), rsync will translate
  2456. the filenames you specify on the command\-line that are being sent to the
  2457. remote host. See also the \fB\-\-files\-from\fP option.
  2458. .IP
  2459. Note that rsync does not do any conversion of names in filter files
  2460. (including include/exclude files). It is up to you to ensure that you\(cq\&re
  2461. specifying matching rules that can match on both sides of the transfer.
  2462. For instance, you can specify extra include/exclude rules if there are
  2463. filename differences on the two sides that need to be accounted for.
  2464. .IP
  2465. When you pass an \fB\-\-iconv\fP option to an rsync daemon that allows it, the
  2466. daemon uses the charset specified in its \(dq\&charset\(dq\& configuration parameter
  2467. regardless of the remote charset you actually pass. Thus, you may feel free to
  2468. specify just the local charset for a daemon transfer (e.g. \fB\-\-iconv=utf8\fP).
  2469. .IP
  2470. .IP "\fB\-4, \-\-ipv4\fP or \fB\-6, \-\-ipv6\fP"
  2471. Tells rsync to prefer IPv4/IPv6
  2472. when creating sockets. This only affects sockets that rsync has direct
  2473. control over, such as the outgoing socket when directly contacting an
  2474. rsync daemon. See also these options in the \fB\-\-daemon\fP mode section.
  2475. .IP
  2476. If rsync was complied without support for IPv6, the \fB\-\-ipv6\fP option
  2477. will have no effect. The \fB\-\-version\fP output will tell you if this
  2478. is the case.
  2479. .IP
  2480. .IP "\fB\-\-checksum\-seed=NUM\fP"
  2481. Set the checksum seed to the integer
  2482. NUM. This 4 byte checksum seed is included in each block and file
  2483. checksum calculation. By default the checksum seed is generated
  2484. by the server and defaults to the current
  2485. \f(CWtime()\fP
  2486. \&. This option
  2487. is used to set a specific checksum seed, which is useful for
  2488. applications that want repeatable block and file checksums, or
  2489. in the case where the user wants a more random checksum seed.
  2490. Setting NUM to 0 causes rsync to use the default of
  2491. \f(CWtime()\fP
  2492. for checksum seed.
  2493. .PP
  2494. .SH "DAEMON OPTIONS"
  2495. .PP
  2496. The options allowed when starting an rsync daemon are as follows:
  2497. .PP
  2498. .IP "\fB\-\-daemon\fP"
  2499. This tells rsync that it is to run as a daemon. The
  2500. daemon you start running may be accessed using an rsync client using
  2501. the \fBhost::module\fP or \fBrsync://host/module/\fP syntax.
  2502. .IP
  2503. If standard input is a socket then rsync will assume that it is being
  2504. run via inetd, otherwise it will detach from the current terminal and
  2505. become a background daemon. The daemon will read the config file
  2506. (rsyncd.conf) on each connect made by a client and respond to
  2507. requests accordingly. See the \fBrsyncd.conf\fP(5) man page for more
  2508. details.
  2509. .IP
  2510. .IP "\fB\-\-address\fP"
  2511. By default rsync will bind to the wildcard address when
  2512. run as a daemon with the \fB\-\-daemon\fP option. The \fB\-\-address\fP option
  2513. allows you to specify a specific IP address (or hostname) to bind to. This
  2514. makes virtual hosting possible in conjunction with the \fB\-\-config\fP option.
  2515. See also the \(dq\&address\(dq\& global option in the rsyncd.conf manpage.
  2516. .IP
  2517. .IP "\fB\-\-bwlimit=KBPS\fP"
  2518. This option allows you to specify a maximum
  2519. transfer rate in kilobytes per second for the data the daemon sends.
  2520. The client can still specify a smaller \fB\-\-bwlimit\fP value, but their
  2521. requested value will be rounded down if they try to exceed it. See the
  2522. client version of this option (above) for some extra details.
  2523. .IP
  2524. .IP "\fB\-\-config=FILE\fP"
  2525. This specifies an alternate config file than
  2526. the default. This is only relevant when \fB\-\-daemon\fP is specified.
  2527. The default is /etc/rsyncd.conf unless the daemon is running over
  2528. a remote shell program and the remote user is not the super\-user; in that case
  2529. the default is rsyncd.conf in the current directory (typically $HOME).
  2530. .IP
  2531. .IP "\fB\-\-no\-detach\fP"
  2532. When running as a daemon, this option instructs
  2533. rsync to not detach itself and become a background process. This
  2534. option is required when running as a service on Cygwin, and may also
  2535. be useful when rsync is supervised by a program such as
  2536. \fBdaemontools\fP or AIX\(cq\&s \fBSystem Resource Controller\fP.
  2537. \fB\-\-no\-detach\fP is also recommended when rsync is run under a
  2538. debugger. This option has no effect if rsync is run from inetd or
  2539. sshd.
  2540. .IP
  2541. .IP "\fB\-\-port=PORT\fP"
  2542. This specifies an alternate TCP port number for the
  2543. daemon to listen on rather than the default of 873. See also the \(dq\&port\(dq\&
  2544. global option in the rsyncd.conf manpage.
  2545. .IP
  2546. .IP "\fB\-\-log\-file=FILE\fP"
  2547. This option tells the rsync daemon to use the
  2548. given log\-file name instead of using the \(dq\&log file\(dq\& setting in the config
  2549. file.
  2550. .IP
  2551. .IP "\fB\-\-log\-file\-format=FORMAT\fP"
  2552. This option tells the rsync daemon to use the
  2553. given FORMAT string instead of using the \(dq\&log format\(dq\& setting in the config
  2554. file. It also enables \(dq\&transfer logging\(dq\& unless the string is empty, in which
  2555. case transfer logging is turned off.
  2556. .IP
  2557. .IP "\fB\-\-sockopts\fP"
  2558. This overrides the \fBsocket options\fP setting in the
  2559. rsyncd.conf file and has the same syntax.
  2560. .IP
  2561. .IP "\fB\-v, \-\-verbose\fP"
  2562. This option increases the amount of information the
  2563. daemon logs during its startup phase. After the client connects, the
  2564. daemon\(cq\&s verbosity level will be controlled by the options that the client
  2565. used and the \(dq\&max verbosity\(dq\& setting in the module\(cq\&s config section.
  2566. .IP
  2567. .IP "\fB\-4, \-\-ipv4\fP or \fB\-6, \-\-ipv6\fP"
  2568. Tells rsync to prefer IPv4/IPv6
  2569. when creating the incoming sockets that the rsync daemon will use to
  2570. listen for connections. One of these options may be required in older
  2571. versions of Linux to work around an IPv6 bug in the kernel (if you see
  2572. an \(dq\&address already in use\(dq\& error when nothing else is using the port,
  2573. try specifying \fB\-\-ipv6\fP or \fB\-\-ipv4\fP when starting the daemon).
  2574. .IP
  2575. If rsync was complied without support for IPv6, the \fB\-\-ipv6\fP option
  2576. will have no effect. The \fB\-\-version\fP output will tell you if this
  2577. is the case.
  2578. .IP
  2579. .IP "\fB\-h, \-\-help\fP"
  2580. When specified after \fB\-\-daemon\fP, print a short help
  2581. page describing the options available for starting an rsync daemon.
  2582. .PP
  2583. .SH "FILTER RULES"
  2584. .PP
  2585. The filter rules allow for flexible selection of which files to transfer
  2586. (include) and which files to skip (exclude). The rules either directly
  2587. specify include/exclude patterns or they specify a way to acquire more
  2588. include/exclude patterns (e.g. to read them from a file).
  2589. .PP
  2590. As the list of files/directories to transfer is built, rsync checks each
  2591. name to be transferred against the list of include/exclude patterns in
  2592. turn, and the first matching pattern is acted on: if it is an exclude
  2593. pattern, then that file is skipped; if it is an include pattern then that
  2594. filename is not skipped; if no matching pattern is found, then the
  2595. filename is not skipped.
  2596. .PP
  2597. Rsync builds an ordered list of filter rules as specified on the
  2598. command\-line. Filter rules have the following syntax:
  2599. .PP
  2600. .RS
  2601. \f(CWRULE [PATTERN_OR_FILENAME]\fP
  2602. .br
  2603. \f(CWRULE,MODIFIERS [PATTERN_OR_FILENAME]\fP
  2604. .br
  2605. .RE
  2606. .PP
  2607. You have your choice of using either short or long RULE names, as described
  2608. below. If you use a short\-named rule, the \(cq\&,\(cq\& separating the RULE from the
  2609. MODIFIERS is optional. The PATTERN or FILENAME that follows (when present)
  2610. must come after either a single space or an underscore (_).
  2611. Here are the available rule prefixes:
  2612. .PP
  2613. .RS
  2614. \fBexclude, \-\fP specifies an exclude pattern.
  2615. .br
  2616. \fBinclude, +\fP specifies an include pattern.
  2617. .br
  2618. \fBmerge, .\fP specifies a merge\-file to read for more rules.
  2619. .br
  2620. \fBdir\-merge, :\fP specifies a per\-directory merge\-file.
  2621. .br
  2622. \fBhide, H\fP specifies a pattern for hiding files from the transfer.
  2623. .br
  2624. \fBshow, S\fP files that match the pattern are not hidden.
  2625. .br
  2626. \fBprotect, P\fP specifies a pattern for protecting files from deletion.
  2627. .br
  2628. \fBrisk, R\fP files that match the pattern are not protected.
  2629. .br
  2630. \fBclear, !\fP clears the current include/exclude list (takes no arg)
  2631. .br
  2632. .RE
  2633. .PP
  2634. When rules are being read from a file, empty lines are ignored, as are
  2635. comment lines that start with a \(dq\&#\(dq\&.
  2636. .PP
  2637. Note that the \fB\-\-include\fP/\fB\-\-exclude\fP command\-line options do not allow the
  2638. full range of rule parsing as described above \-\- they only allow the
  2639. specification of include/exclude patterns plus a \(dq\&!\(dq\& token to clear the
  2640. list (and the normal comment parsing when rules are read from a file).
  2641. If a pattern
  2642. does not begin with \(dq\&\- \(dq\& (dash, space) or \(dq\&+ \(dq\& (plus, space), then the
  2643. rule will be interpreted as if \(dq\&+ \(dq\& (for an include option) or \(dq\&\- \(dq\& (for
  2644. an exclude option) were prefixed to the string. A \fB\-\-filter\fP option, on
  2645. the other hand, must always contain either a short or long rule name at the
  2646. start of the rule.
  2647. .PP
  2648. Note also that the \fB\-\-filter\fP, \fB\-\-include\fP, and \fB\-\-exclude\fP options take one
  2649. rule/pattern each. To add multiple ones, you can repeat the options on
  2650. the command\-line, use the merge\-file syntax of the \fB\-\-filter\fP option, or
  2651. the \fB\-\-include\-from\fP/\fB\-\-exclude\-from\fP options.
  2652. .PP
  2653. .SH "INCLUDE/EXCLUDE PATTERN RULES"
  2654. .PP
  2655. You can include and exclude files by specifying patterns using the \(dq\&+\(dq\&,
  2656. \(dq\&\-\(dq\&, etc. filter rules (as introduced in the FILTER RULES section above).
  2657. The include/exclude rules each specify a pattern that is matched against
  2658. the names of the files that are going to be transferred. These patterns
  2659. can take several forms:
  2660. .PP
  2661. .IP o
  2662. if the pattern starts with a / then it is anchored to a
  2663. particular spot in the hierarchy of files, otherwise it is matched
  2664. against the end of the pathname. This is similar to a leading ^ in
  2665. regular expressions.
  2666. Thus \(dq\&/foo\(dq\& would match a name of \(dq\&foo\(dq\& at either the \(dq\&root of the
  2667. transfer\(dq\& (for a global rule) or in the merge\-file\(cq\&s directory (for a
  2668. per\-directory rule).
  2669. An unqualified \(dq\&foo\(dq\& would match a name of \(dq\&foo\(dq\& anywhere in the
  2670. tree because the algorithm is applied recursively from the
  2671. top down; it behaves as if each path component gets a turn at being the
  2672. end of the filename. Even the unanchored \(dq\&sub/foo\(dq\& would match at
  2673. any point in the hierarchy where a \(dq\&foo\(dq\& was found within a directory
  2674. named \(dq\&sub\(dq\&. See the section on ANCHORING INCLUDE/EXCLUDE PATTERNS for
  2675. a full discussion of how to specify a pattern that matches at the root
  2676. of the transfer.
  2677. .IP o
  2678. if the pattern ends with a / then it will only match a
  2679. directory, not a regular file, symlink, or device.
  2680. .IP o
  2681. rsync chooses between doing a simple string match and wildcard
  2682. matching by checking if the pattern contains one of these three wildcard
  2683. characters: \(cq\&*\(cq\&, \(cq\&?\(cq\&, and \(cq\&[\(cq\& .
  2684. .IP o
  2685. a \(cq\&*\(cq\& matches any path component, but it stops at slashes.
  2686. .IP o
  2687. use \(cq\&**\(cq\& to match anything, including slashes.
  2688. .IP o
  2689. a \(cq\&?\(cq\& matches any character except a slash (/).
  2690. .IP o
  2691. a \(cq\&[\(cq\& introduces a character class, such as [a\-z] or [[:alpha:]].
  2692. .IP o
  2693. in a wildcard pattern, a backslash can be used to escape a wildcard
  2694. character, but it is matched literally when no wildcards are present.
  2695. .IP o
  2696. if the pattern contains a / (not counting a trailing /) or a \(dq\&**\(dq\&,
  2697. then it is matched against the full pathname, including any leading
  2698. directories. If the pattern doesn\(cq\&t contain a / or a \(dq\&**\(dq\&, then it is
  2699. matched only against the final component of the filename.
  2700. (Remember that the algorithm is applied recursively so \(dq\&full filename\(dq\&
  2701. can actually be any portion of a path from the starting directory on
  2702. down.)
  2703. .IP o
  2704. a trailing \(dq\&dir_name/***\(dq\& will match both the directory (as if
  2705. \(dq\&dir_name/\(dq\& had been specified) and everything in the directory
  2706. (as if \(dq\&dir_name/**\(dq\& had been specified). This behavior was added in
  2707. version 2.6.7.
  2708. .PP
  2709. Note that, when using the \fB\-\-recursive\fP (\fB\-r\fP) option (which is implied by
  2710. \fB\-a\fP), every subcomponent of every path is visited from the top down, so
  2711. include/exclude patterns get applied recursively to each subcomponent\(cq\&s
  2712. full name (e.g. to include \(dq\&/foo/bar/baz\(dq\& the subcomponents \(dq\&/foo\(dq\& and
  2713. \(dq\&/foo/bar\(dq\& must not be excluded).
  2714. The exclude patterns actually short\-circuit the directory traversal stage
  2715. when rsync finds the files to send. If a pattern excludes a particular
  2716. parent directory, it can render a deeper include pattern ineffectual
  2717. because rsync did not descend through that excluded section of the
  2718. hierarchy. This is particularly important when using a trailing \(cq\&*\(cq\& rule.
  2719. For instance, this won\(cq\&t work:
  2720. .PP
  2721. .RS
  2722. \f(CW+ /some/path/this\-file\-will\-not\-be\-found\fP
  2723. .br
  2724. \f(CW+ /file\-is\-included\fP
  2725. .br
  2726. \f(CW\- *\fP
  2727. .br
  2728. .RE
  2729. .PP
  2730. This fails because the parent directory \(dq\&some\(dq\& is excluded by the \(cq\&*\(cq\&
  2731. rule, so rsync never visits any of the files in the \(dq\&some\(dq\& or \(dq\&some/path\(dq\&
  2732. directories. One solution is to ask for all directories in the hierarchy
  2733. to be included by using a single rule: \(dq\&+ */\(dq\& (put it somewhere before the
  2734. \(dq\&\- *\(dq\& rule), and perhaps use the \fB\-\-prune\-empty\-dirs\fP option. Another
  2735. solution is to add specific include rules for all
  2736. the parent dirs that need to be visited. For instance, this set of rules
  2737. works fine:
  2738. .PP
  2739. .RS
  2740. \f(CW+ /some/\fP
  2741. .br
  2742. \f(CW+ /some/path/\fP
  2743. .br
  2744. \f(CW+ /some/path/this\-file\-is\-found\fP
  2745. .br
  2746. \f(CW+ /file\-also\-included\fP
  2747. .br
  2748. \f(CW\- *\fP
  2749. .br
  2750. .RE
  2751. .PP
  2752. Here are some examples of exclude/include matching:
  2753. .PP
  2754. .IP o
  2755. \(dq\&\- *.o\(dq\& would exclude all names matching *.o
  2756. .IP o
  2757. \(dq\&\- /foo\(dq\& would exclude a file (or directory) named foo in the
  2758. transfer\-root directory
  2759. .IP o
  2760. \(dq\&\- foo/\(dq\& would exclude any directory named foo
  2761. .IP o
  2762. \(dq\&\- /foo/*/bar\(dq\& would exclude any file named bar which is at two
  2763. levels below a directory named foo in the transfer\-root directory
  2764. .IP o
  2765. \(dq\&\- /foo/**/bar\(dq\& would exclude any file named bar two
  2766. or more levels below a directory named foo in the transfer\-root directory
  2767. .IP o
  2768. The combination of \(dq\&+ */\(dq\&, \(dq\&+ *.c\(dq\&, and \(dq\&\- *\(dq\& would include all
  2769. directories and C source files but nothing else (see also the
  2770. \fB\-\-prune\-empty\-dirs\fP option)
  2771. .IP o
  2772. The combination of \(dq\&+ foo/\(dq\&, \(dq\&+ foo/bar.c\(dq\&, and \(dq\&\- *\(dq\& would include
  2773. only the foo directory and foo/bar.c (the foo directory must be
  2774. explicitly included or it would be excluded by the \(dq\&*\(dq\&)
  2775. .PP
  2776. The following modifiers are accepted after a \(dq\&+\(dq\& or \(dq\&\-\(dq\&:
  2777. .PP
  2778. .IP o
  2779. A \fB/\fP specifies that the include/exclude rule should be matched
  2780. against the absolute pathname of the current item. For example,
  2781. \(dq\&\-/ /etc/passwd\(dq\& would exclude the passwd file any time the transfer
  2782. was sending files from the \(dq\&/etc\(dq\& directory, and \(dq\&\-/ subdir/foo\(dq\&
  2783. would always exclude \(dq\&foo\(dq\& when it is in a dir named \(dq\&subdir\(dq\&, even
  2784. if \(dq\&foo\(dq\& is at the root of the current transfer.
  2785. .IP o
  2786. A \fB!\fP specifies that the include/exclude should take effect if
  2787. the pattern fails to match. For instance, \(dq\&\-! */\(dq\& would exclude all
  2788. non\-directories.
  2789. .IP o
  2790. A \fBC\fP is used to indicate that all the global CVS\-exclude rules
  2791. should be inserted as excludes in place of the \(dq\&\-C\(dq\&. No arg should
  2792. follow.
  2793. .IP o
  2794. An \fBs\fP is used to indicate that the rule applies to the sending
  2795. side. When a rule affects the sending side, it prevents files from
  2796. being transferred. The default is for a rule to affect both sides
  2797. unless \fB\-\-delete\-excluded\fP was specified, in which case default rules
  2798. become sender\-side only. See also the hide (H) and show (S) rules,
  2799. which are an alternate way to specify sending\-side includes/excludes.
  2800. .IP o
  2801. An \fBr\fP is used to indicate that the rule applies to the receiving
  2802. side. When a rule affects the receiving side, it prevents files from
  2803. being deleted. See the \fBs\fP modifier for more info. See also the
  2804. protect (P) and risk (R) rules, which are an alternate way to
  2805. specify receiver\-side includes/excludes.
  2806. .IP o
  2807. A \fBp\fP indicates that a rule is perishable, meaning that it is
  2808. ignored in directories that are being deleted. For instance, the \fB\-C\fP
  2809. option\(cq\&s default rules that exclude things like \(dq\&CVS\(dq\& and \(dq\&*.o\(dq\& are
  2810. marked as perishable, and will not prevent a directory that was removed
  2811. on the source from being deleted on the destination.
  2812. .PP
  2813. .SH "MERGE\-FILE FILTER RULES"
  2814. .PP
  2815. You can merge whole files into your filter rules by specifying either a
  2816. merge (.) or a dir\-merge (:) filter rule (as introduced in the FILTER RULES
  2817. section above).
  2818. .PP
  2819. There are two kinds of merged files \-\- single\-instance (\(cq\&.\(cq\&) and
  2820. per\-directory (\(cq\&:\(cq\&). A single\-instance merge file is read one time, and
  2821. its rules are incorporated into the filter list in the place of the \(dq\&.\(dq\&
  2822. rule. For per\-directory merge files, rsync will scan every directory that
  2823. it traverses for the named file, merging its contents when the file exists
  2824. into the current list of inherited rules. These per\-directory rule files
  2825. must be created on the sending side because it is the sending side that is
  2826. being scanned for the available files to transfer. These rule files may
  2827. also need to be transferred to the receiving side if you want them to
  2828. affect what files don\(cq\&t get deleted (see PER\-DIRECTORY RULES AND DELETE
  2829. below).
  2830. .PP
  2831. Some examples:
  2832. .PP
  2833. .RS
  2834. \f(CWmerge /etc/rsync/default.rules\fP
  2835. .br
  2836. \f(CW. /etc/rsync/default.rules\fP
  2837. .br
  2838. \f(CWdir\-merge .per\-dir\-filter\fP
  2839. .br
  2840. \f(CWdir\-merge,n\- .non\-inherited\-per\-dir\-excludes\fP
  2841. .br
  2842. \f(CW:n\- .non\-inherited\-per\-dir\-excludes\fP
  2843. .br
  2844. .RE
  2845. .PP
  2846. The following modifiers are accepted after a merge or dir\-merge rule:
  2847. .PP
  2848. .IP o
  2849. A \fB\-\fP specifies that the file should consist of only exclude
  2850. patterns, with no other rule\-parsing except for in\-file comments.
  2851. .IP o
  2852. A \fB+\fP specifies that the file should consist of only include
  2853. patterns, with no other rule\-parsing except for in\-file comments.
  2854. .IP o
  2855. A \fBC\fP is a way to specify that the file should be read in a
  2856. CVS\-compatible manner. This turns on \(cq\&n\(cq\&, \(cq\&w\(cq\&, and \(cq\&\-\(cq\&, but also
  2857. allows the list\-clearing token (!) to be specified. If no filename is
  2858. provided, \(dq\&.cvsignore\(dq\& is assumed.
  2859. .IP o
  2860. A \fBe\fP will exclude the merge\-file name from the transfer; e.g.
  2861. \(dq\&dir\-merge,e .rules\(dq\& is like \(dq\&dir\-merge .rules\(dq\& and \(dq\&\- .rules\(dq\&.
  2862. .IP o
  2863. An \fBn\fP specifies that the rules are not inherited by subdirectories.
  2864. .IP o
  2865. A \fBw\fP specifies that the rules are word\-split on whitespace instead
  2866. of the normal line\-splitting. This also turns off comments. Note: the
  2867. space that separates the prefix from the rule is treated specially, so
  2868. \(dq\&\- foo + bar\(dq\& is parsed as two rules (assuming that prefix\-parsing wasn\(cq\&t
  2869. also disabled).
  2870. .IP o
  2871. You may also specify any of the modifiers for the \(dq\&+\(dq\& or \(dq\&\-\(dq\& rules
  2872. (above) in order to have the rules that are read in from the file
  2873. default to having that modifier set (except for the \fB!\fP modifier, which
  2874. would not be useful). For instance, \(dq\&merge,\-/ .excl\(dq\& would
  2875. treat the contents of .excl as absolute\-path excludes,
  2876. while \(dq\&dir\-merge,s .filt\(dq\& and \(dq\&:sC\(dq\& would each make all their
  2877. per\-directory rules apply only on the sending side. If the merge rule
  2878. specifies sides to affect (via the \fBs\fP or \fBr\fP modifier or both),
  2879. then the rules in the file must not specify sides (via a modifier or
  2880. a rule prefix such as \fBhide\fP).
  2881. .PP
  2882. Per\-directory rules are inherited in all subdirectories of the directory
  2883. where the merge\-file was found unless the \(cq\&n\(cq\& modifier was used. Each
  2884. subdirectory\(cq\&s rules are prefixed to the inherited per\-directory rules
  2885. from its parents, which gives the newest rules a higher priority than the
  2886. inherited rules. The entire set of dir\-merge rules are grouped together in
  2887. the spot where the merge\-file was specified, so it is possible to override
  2888. dir\-merge rules via a rule that got specified earlier in the list of global
  2889. rules. When the list\-clearing rule (\(dq\&!\(dq\&) is read from a per\-directory
  2890. file, it only clears the inherited rules for the current merge file.
  2891. .PP
  2892. Another way to prevent a single rule from a dir\-merge file from being inherited is to
  2893. anchor it with a leading slash. Anchored rules in a per\-directory
  2894. merge\-file are relative to the merge\-file\(cq\&s directory, so a pattern \(dq\&/foo\(dq\&
  2895. would only match the file \(dq\&foo\(dq\& in the directory where the dir\-merge filter
  2896. file was found.
  2897. .PP
  2898. Here\(cq\&s an example filter file which you\(cq\&d specify via \fB\-\-filter=\(dq\&. file\(dq\&:\fP
  2899. .PP
  2900. .RS
  2901. \f(CWmerge /home/user/.global\-filter\fP
  2902. .br
  2903. \f(CW\- *.gz\fP
  2904. .br
  2905. \f(CWdir\-merge .rules\fP
  2906. .br
  2907. \f(CW+ *.[ch]\fP
  2908. .br
  2909. \f(CW\- *.o\fP
  2910. .br
  2911. .RE
  2912. .PP
  2913. This will merge the contents of the /home/user/.global\-filter file at the
  2914. start of the list and also turns the \(dq\&.rules\(dq\& filename into a per\-directory
  2915. filter file. All rules read in prior to the start of the directory scan
  2916. follow the global anchoring rules (i.e. a leading slash matches at the root
  2917. of the transfer).
  2918. .PP
  2919. If a per\-directory merge\-file is specified with a path that is a parent
  2920. directory of the first transfer directory, rsync will scan all the parent
  2921. dirs from that starting point to the transfer directory for the indicated
  2922. per\-directory file. For instance, here is a common filter (see \fB\-F\fP):
  2923. .PP
  2924. .RS
  2925. \f(CW\-\-filter='\&: /.rsync\-filter'\&\fP
  2926. .RE
  2927. .PP
  2928. That rule tells rsync to scan for the file .rsync\-filter in all
  2929. directories from the root down through the parent directory of the
  2930. transfer prior to the start of the normal directory scan of the file in
  2931. the directories that are sent as a part of the transfer. (Note: for an
  2932. rsync daemon, the root is always the same as the module\(cq\&s \(dq\&path\(dq\&.)
  2933. .PP
  2934. Some examples of this pre\-scanning for per\-directory files:
  2935. .PP
  2936. .RS
  2937. \f(CWrsync \-avF /src/path/ /dest/dir\fP
  2938. .br
  2939. \f(CWrsync \-av \-\-filter='\&: ../../.rsync\-filter'\& /src/path/ /dest/dir\fP
  2940. .br
  2941. \f(CWrsync \-av \-\-filter='\&: .rsync\-filter'\& /src/path/ /dest/dir\fP
  2942. .br
  2943. .RE
  2944. .PP
  2945. The first two commands above will look for \(dq\&.rsync\-filter\(dq\& in \(dq\&/\(dq\& and
  2946. \(dq\&/src\(dq\& before the normal scan begins looking for the file in \(dq\&/src/path\(dq\&
  2947. and its subdirectories. The last command avoids the parent\-dir scan
  2948. and only looks for the \(dq\&.rsync\-filter\(dq\& files in each directory that is
  2949. a part of the transfer.
  2950. .PP
  2951. If you want to include the contents of a \(dq\&.cvsignore\(dq\& in your patterns,
  2952. you should use the rule \(dq\&:C\(dq\&, which creates a dir\-merge of the .cvsignore
  2953. file, but parsed in a CVS\-compatible manner. You can
  2954. use this to affect where the \fB\-\-cvs\-exclude\fP (\fB\-C\fP) option\(cq\&s inclusion of the
  2955. per\-directory .cvsignore file gets placed into your rules by putting the
  2956. \(dq\&:C\(dq\& wherever you like in your filter rules. Without this, rsync would
  2957. add the dir\-merge rule for the .cvsignore file at the end of all your other
  2958. rules (giving it a lower priority than your command\-line rules). For
  2959. example:
  2960. .PP
  2961. .RS
  2962. \f(CWcat <<EOT | rsync \-avC \-\-filter='\&. \-'\& a/ b\fP
  2963. .br
  2964. \f(CW+ foo.o\fP
  2965. .br
  2966. \f(CW:C\fP
  2967. .br
  2968. \f(CW\- *.old\fP
  2969. .br
  2970. \f(CWEOT\fP
  2971. .br
  2972. \f(CWrsync \-avC \-\-include=foo.o \-f :C \-\-exclude='\&*.old'\& a/ b\fP
  2973. .br
  2974. .RE
  2975. .PP
  2976. Both of the above rsync commands are identical. Each one will merge all
  2977. the per\-directory .cvsignore rules in the middle of the list rather than
  2978. at the end. This allows their dir\-specific rules to supersede the rules
  2979. that follow the :C instead of being subservient to all your rules. To
  2980. affect the other CVS exclude rules (i.e. the default list of exclusions,
  2981. the contents of $HOME/.cvsignore, and the value of $CVSIGNORE) you should
  2982. omit the \fB\-C\fP command\-line option and instead insert a \(dq\&\-C\(dq\& rule into
  2983. your filter rules; e.g. \(dq\&\fB\-\-filter=\-C\fP\(dq\&.
  2984. .PP
  2985. .SH "LIST\-CLEARING FILTER RULE"
  2986. .PP
  2987. You can clear the current include/exclude list by using the \(dq\&!\(dq\& filter
  2988. rule (as introduced in the FILTER RULES section above). The \(dq\&current\(dq\&
  2989. list is either the global list of rules (if the rule is encountered while
  2990. parsing the filter options) or a set of per\-directory rules (which are
  2991. inherited in their own sub\-list, so a subdirectory can use this to clear
  2992. out the parent\(cq\&s rules).
  2993. .PP
  2994. .SH "ANCHORING INCLUDE/EXCLUDE PATTERNS"
  2995. .PP
  2996. As mentioned earlier, global include/exclude patterns are anchored at the
  2997. \(dq\&root of the transfer\(dq\& (as opposed to per\-directory patterns, which are
  2998. anchored at the merge\-file\(cq\&s directory). If you think of the transfer as
  2999. a subtree of names that are being sent from sender to receiver, the
  3000. transfer\-root is where the tree starts to be duplicated in the destination
  3001. directory. This root governs where patterns that start with a / match.
  3002. .PP
  3003. Because the matching is relative to the transfer\-root, changing the
  3004. trailing slash on a source path or changing your use of the \fB\-\-relative\fP
  3005. option affects the path you need to use in your matching (in addition to
  3006. changing how much of the file tree is duplicated on the destination
  3007. host). The following examples demonstrate this.
  3008. .PP
  3009. Let\(cq\&s say that we want to match two source files, one with an absolute
  3010. path of \(dq\&/home/me/foo/bar\(dq\&, and one with a path of \(dq\&/home/you/bar/baz\(dq\&.
  3011. Here is how the various command choices differ for a 2\-source transfer:
  3012. .PP
  3013. .RS
  3014. Example cmd: rsync \-a /home/me /home/you /dest
  3015. .br
  3016. +/\- pattern: /me/foo/bar
  3017. .br
  3018. +/\- pattern: /you/bar/baz
  3019. .br
  3020. Target file: /dest/me/foo/bar
  3021. .br
  3022. Target file: /dest/you/bar/baz
  3023. .br
  3024. .RE
  3025. .PP
  3026. .RS
  3027. Example cmd: rsync \-a /home/me/ /home/you/ /dest
  3028. .br
  3029. +/\- pattern: /foo/bar (note missing \(dq\&me\(dq\&)
  3030. .br
  3031. +/\- pattern: /bar/baz (note missing \(dq\&you\(dq\&)
  3032. .br
  3033. Target file: /dest/foo/bar
  3034. .br
  3035. Target file: /dest/bar/baz
  3036. .br
  3037. .RE
  3038. .PP
  3039. .RS
  3040. Example cmd: rsync \-a \-\-relative /home/me/ /home/you /dest
  3041. .br
  3042. +/\- pattern: /home/me/foo/bar (note full path)
  3043. .br
  3044. +/\- pattern: /home/you/bar/baz (ditto)
  3045. .br
  3046. Target file: /dest/home/me/foo/bar
  3047. .br
  3048. Target file: /dest/home/you/bar/baz
  3049. .br
  3050. .RE
  3051. .PP
  3052. .RS
  3053. Example cmd: cd /home; rsync \-a \-\-relative me/foo you/ /dest
  3054. .br
  3055. +/\- pattern: /me/foo/bar (starts at specified path)
  3056. .br
  3057. +/\- pattern: /you/bar/baz (ditto)
  3058. .br
  3059. Target file: /dest/me/foo/bar
  3060. .br
  3061. Target file: /dest/you/bar/baz
  3062. .br
  3063. .RE
  3064. .PP
  3065. The easiest way to see what name you should filter is to just
  3066. look at the output when using \fB\-\-verbose\fP and put a / in front of the name
  3067. (use the \fB\-\-dry\-run\fP option if you\(cq\&re not yet ready to copy any files).
  3068. .PP
  3069. .SH "PER\-DIRECTORY RULES AND DELETE"
  3070. .PP
  3071. Without a delete option, per\-directory rules are only relevant on the
  3072. sending side, so you can feel free to exclude the merge files themselves
  3073. without affecting the transfer. To make this easy, the \(cq\&e\(cq\& modifier adds
  3074. this exclude for you, as seen in these two equivalent commands:
  3075. .PP
  3076. .RS
  3077. \f(CWrsync \-av \-\-filter='\&: .excl'\& \-\-exclude=.excl host:src/dir /dest\fP
  3078. .br
  3079. \f(CWrsync \-av \-\-filter='\&:e .excl'\& host:src/dir /dest\fP
  3080. .br
  3081. .RE
  3082. .PP
  3083. However, if you want to do a delete on the receiving side AND you want some
  3084. files to be excluded from being deleted, you\(cq\&ll need to be sure that the
  3085. receiving side knows what files to exclude. The easiest way is to include
  3086. the per\-directory merge files in the transfer and use \fB\-\-delete\-after\fP,
  3087. because this ensures that the receiving side gets all the same exclude
  3088. rules as the sending side before it tries to delete anything:
  3089. .PP
  3090. .RS
  3091. \f(CWrsync \-avF \-\-delete\-after host:src/dir /dest\fP
  3092. .RE
  3093. .PP
  3094. However, if the merge files are not a part of the transfer, you\(cq\&ll need to
  3095. either specify some global exclude rules (i.e. specified on the command
  3096. line), or you\(cq\&ll need to maintain your own per\-directory merge files on
  3097. the receiving side. An example of the first is this (assume that the
  3098. remote .rules files exclude themselves):
  3099. .PP
  3100. .nf
  3101. rsync \-av \-\-filter=\(cq\&: .rules\(cq\& \-\-filter=\(cq\&. /my/extra.rules\(cq\&
  3102. \-\-delete host:src/dir /dest
  3103. .fi
  3104. .PP
  3105. In the above example the extra.rules file can affect both sides of the
  3106. transfer, but (on the sending side) the rules are subservient to the rules
  3107. merged from the .rules files because they were specified after the
  3108. per\-directory merge rule.
  3109. .PP
  3110. In one final example, the remote side is excluding the .rsync\-filter
  3111. files from the transfer, but we want to use our own .rsync\-filter files
  3112. to control what gets deleted on the receiving side. To do this we must
  3113. specifically exclude the per\-directory merge files (so that they don\(cq\&t get
  3114. deleted) and then put rules into the local files to control what else
  3115. should not get deleted. Like one of these commands:
  3116. .PP
  3117. .nf
  3118. rsync \-av \-\-filter='\&:e /.rsync\-filter'\& \-\-delete \e
  3119. host:src/dir /dest
  3120. rsync \-avFF \-\-delete host:src/dir /dest
  3121. .fi
  3122. .PP
  3123. .SH "BATCH MODE"
  3124. .PP
  3125. Batch mode can be used to apply the same set of updates to many
  3126. identical systems. Suppose one has a tree which is replicated on a
  3127. number of hosts. Now suppose some changes have been made to this
  3128. source tree and those changes need to be propagated to the other
  3129. hosts. In order to do this using batch mode, rsync is run with the
  3130. write\-batch option to apply the changes made to the source tree to one
  3131. of the destination trees. The write\-batch option causes the rsync
  3132. client to store in a \(dq\&batch file\(dq\& all the information needed to repeat
  3133. this operation against other, identical destination trees.
  3134. .PP
  3135. Generating the batch file once saves having to perform the file
  3136. status, checksum, and data block generation more than once when
  3137. updating multiple destination trees. Multicast transport protocols can
  3138. be used to transfer the batch update files in parallel to many hosts
  3139. at once, instead of sending the same data to every host individually.
  3140. .PP
  3141. To apply the recorded changes to another destination tree, run rsync
  3142. with the read\-batch option, specifying the name of the same batch
  3143. file, and the destination tree. Rsync updates the destination tree
  3144. using the information stored in the batch file.
  3145. .PP
  3146. For your convenience, a script file is also created when the write\-batch
  3147. option is used: it will be named the same as the batch file with \(dq\&.sh\(dq\&
  3148. appended. This script file contains a command\-line suitable for updating a
  3149. destination tree using the associated batch file. It can be executed using
  3150. a Bourne (or Bourne\-like) shell, optionally passing in an alternate
  3151. destination tree pathname which is then used instead of the original
  3152. destination path. This is useful when the destination tree path on the
  3153. current host differs from the one used to create the batch file.
  3154. .PP
  3155. Examples:
  3156. .PP
  3157. .RS
  3158. \f(CW$ rsync \-\-write\-batch=foo \-a host:/source/dir/ /adest/dir/\fP
  3159. .br
  3160. \f(CW$ scp foo* remote:\fP
  3161. .br
  3162. \f(CW$ ssh remote ./foo.sh /bdest/dir/\fP
  3163. .br
  3164. .RE
  3165. .PP
  3166. .RS
  3167. \f(CW$ rsync \-\-write\-batch=foo \-a /source/dir/ /adest/dir/\fP
  3168. .br
  3169. \f(CW$ ssh remote rsync \-\-read\-batch=\- \-a /bdest/dir/ <foo\fP
  3170. .br
  3171. .RE
  3172. .PP
  3173. In these examples, rsync is used to update /adest/dir/ from /source/dir/
  3174. and the information to repeat this operation is stored in \(dq\&foo\(dq\& and
  3175. \(dq\&foo.sh\(dq\&. The host \(dq\&remote\(dq\& is then updated with the batched data going
  3176. into the directory /bdest/dir. The differences between the two examples
  3177. reveals some of the flexibility you have in how you deal with batches:
  3178. .PP
  3179. .IP o
  3180. The first example shows that the initial copy doesn\(cq\&t have to be
  3181. local \-\- you can push or pull data to/from a remote host using either the
  3182. remote\-shell syntax or rsync daemon syntax, as desired.
  3183. .IP o
  3184. The first example uses the created \(dq\&foo.sh\(dq\& file to get the right
  3185. rsync options when running the read\-batch command on the remote host.
  3186. .IP o
  3187. The second example reads the batch data via standard input so that
  3188. the batch file doesn\(cq\&t need to be copied to the remote machine first.
  3189. This example avoids the foo.sh script because it needed to use a modified
  3190. \fB\-\-read\-batch\fP option, but you could edit the script file if you wished to
  3191. make use of it (just be sure that no other option is trying to use
  3192. standard input, such as the \(dq\&\fB\-\-exclude\-from=\-\fP\(dq\& option).
  3193. .PP
  3194. Caveats:
  3195. .PP
  3196. The read\-batch option expects the destination tree that it is updating
  3197. to be identical to the destination tree that was used to create the
  3198. batch update fileset. When a difference between the destination trees
  3199. is encountered the update might be discarded with a warning (if the file
  3200. appears to be up\-to\-date already) or the file\-update may be attempted
  3201. and then, if the file fails to verify, the update discarded with an
  3202. error. This means that it should be safe to re\-run a read\-batch operation
  3203. if the command got interrupted. If you wish to force the batched\-update to
  3204. always be attempted regardless of the file\(cq\&s size and date, use the \fB\-I\fP
  3205. option (when reading the batch).
  3206. If an error occurs, the destination tree will probably be in a
  3207. partially updated state. In that case, rsync can
  3208. be used in its regular (non\-batch) mode of operation to fix up the
  3209. destination tree.
  3210. .PP
  3211. The rsync version used on all destinations must be at least as new as the
  3212. one used to generate the batch file. Rsync will die with an error if the
  3213. protocol version in the batch file is too new for the batch\-reading rsync
  3214. to handle. See also the \fB\-\-protocol\fP option for a way to have the
  3215. creating rsync generate a batch file that an older rsync can understand.
  3216. (Note that batch files changed format in version 2.6.3, so mixing versions
  3217. older than that with newer versions will not work.)
  3218. .PP
  3219. When reading a batch file, rsync will force the value of certain options
  3220. to match the data in the batch file if you didn\(cq\&t set them to the same
  3221. as the batch\-writing command. Other options can (and should) be changed.
  3222. For instance \fB\-\-write\-batch\fP changes to \fB\-\-read\-batch\fP,
  3223. \fB\-\-files\-from\fP is dropped, and the
  3224. \fB\-\-filter\fP/\fB\-\-include\fP/\fB\-\-exclude\fP options are not needed unless
  3225. one of the \fB\-\-delete\fP options is specified.
  3226. .PP
  3227. The code that creates the BATCH.sh file transforms any filter/include/exclude
  3228. options into a single list that is appended as a \(dq\&here\(dq\& document to the
  3229. shell script file. An advanced user can use this to modify the exclude
  3230. list if a change in what gets deleted by \fB\-\-delete\fP is desired. A normal
  3231. user can ignore this detail and just use the shell script as an easy way
  3232. to run the appropriate \fB\-\-read\-batch\fP command for the batched data.
  3233. .PP
  3234. The original batch mode in rsync was based on \(dq\&rsync+\(dq\&, but the latest
  3235. version uses a new implementation.
  3236. .PP
  3237. .SH "SYMBOLIC LINKS"
  3238. .PP
  3239. Three basic behaviors are possible when rsync encounters a symbolic
  3240. link in the source directory.
  3241. .PP
  3242. By default, symbolic links are not transferred at all. A message
  3243. \(dq\&skipping non\-regular\(dq\& file is emitted for any symlinks that exist.
  3244. .PP
  3245. If \fB\-\-links\fP is specified, then symlinks are recreated with the same
  3246. target on the destination. Note that \fB\-\-archive\fP implies
  3247. \fB\-\-links\fP.
  3248. .PP
  3249. If \fB\-\-copy\-links\fP is specified, then symlinks are \(dq\&collapsed\(dq\& by
  3250. copying their referent, rather than the symlink.
  3251. .PP
  3252. Rsync can also distinguish \(dq\&safe\(dq\& and \(dq\&unsafe\(dq\& symbolic links. An
  3253. example where this might be used is a web site mirror that wishes to
  3254. ensure that the rsync module that is copied does not include symbolic links to
  3255. \fB/etc/passwd\fP in the public section of the site. Using
  3256. \fB\-\-copy\-unsafe\-links\fP will cause any links to be copied as the file
  3257. they point to on the destination. Using \fB\-\-safe\-links\fP will cause
  3258. unsafe links to be omitted altogether. (Note that you must specify
  3259. \fB\-\-links\fP for \fB\-\-safe\-links\fP to have any effect.)
  3260. .PP
  3261. Symbolic links are considered unsafe if they are absolute symlinks
  3262. (start with \fB/\fP), empty, or if they contain enough \(dq\&..\(dq\&
  3263. components to ascend from the directory being copied.
  3264. .PP
  3265. Here\(cq\&s a summary of how the symlink options are interpreted. The list is
  3266. in order of precedence, so if your combination of options isn\(cq\&t mentioned,
  3267. use the first line that is a complete subset of your options:
  3268. .PP
  3269. .IP "\fB\-\-copy\-links\fP"
  3270. Turn all symlinks into normal files (leaving no
  3271. symlinks for any other options to affect).
  3272. .PP
  3273. .IP "\fB\-\-links \-\-copy\-unsafe\-links\fP"
  3274. Turn all unsafe symlinks into files
  3275. and duplicate all safe symlinks.
  3276. .PP
  3277. .IP "\fB\-\-copy\-unsafe\-links\fP"
  3278. Turn all unsafe symlinks into files, noisily
  3279. skip all safe symlinks.
  3280. .PP
  3281. .IP "\fB\-\-links \-\-safe\-links\fP"
  3282. Duplicate safe symlinks and skip unsafe
  3283. ones.
  3284. .PP
  3285. .IP "\fB\-\-links\fP"
  3286. Duplicate all symlinks.
  3287. .PP
  3288. .SH "DIAGNOSTICS"
  3289. .PP
  3290. rsync occasionally produces error messages that may seem a little
  3291. cryptic. The one that seems to cause the most confusion is \(dq\&protocol
  3292. version mismatch \-\- is your shell clean?\(dq\&.
  3293. .PP
  3294. This message is usually caused by your startup scripts or remote shell
  3295. facility producing unwanted garbage on the stream that rsync is using
  3296. for its transport. The way to diagnose this problem is to run your
  3297. remote shell like this:
  3298. .PP
  3299. .RS
  3300. \f(CWssh remotehost /bin/true > out.dat\fP
  3301. .RE
  3302. .PP
  3303. then look at out.dat. If everything is working correctly then out.dat
  3304. should be a zero length file. If you are getting the above error from
  3305. rsync then you will probably find that out.dat contains some text or
  3306. data. Look at the contents and try to work out what is producing
  3307. it. The most common cause is incorrectly configured shell startup
  3308. scripts (such as .cshrc or .profile) that contain output statements
  3309. for non\-interactive logins.
  3310. .PP
  3311. If you are having trouble debugging filter patterns, then
  3312. try specifying the \fB\-vv\fP option. At this level of verbosity rsync will
  3313. show why each individual file is included or excluded.
  3314. .PP
  3315. .SH "EXIT VALUES"
  3316. .PP
  3317. .IP "\fB0\fP"
  3318. Success
  3319. .IP "\fB1\fP"
  3320. Syntax or usage error
  3321. .IP "\fB2\fP"
  3322. Protocol incompatibility
  3323. .IP "\fB3\fP"
  3324. Errors selecting input/output files, dirs
  3325. .IP "\fB4\fP"
  3326. Requested action not supported: an attempt
  3327. was made to manipulate 64\-bit files on a platform that cannot support
  3328. them; or an option was specified that is supported by the client and
  3329. not by the server.
  3330. .IP "\fB5\fP"
  3331. Error starting client\-server protocol
  3332. .IP "\fB6\fP"
  3333. Daemon unable to append to log\-file
  3334. .IP "\fB10\fP"
  3335. Error in socket I/O
  3336. .IP "\fB11\fP"
  3337. Error in file I/O
  3338. .IP "\fB12\fP"
  3339. Error in rsync protocol data stream
  3340. .IP "\fB13\fP"
  3341. Errors with program diagnostics
  3342. .IP "\fB14\fP"
  3343. Error in IPC code
  3344. .IP "\fB20\fP"
  3345. Received SIGUSR1 or SIGINT
  3346. .IP "\fB21\fP"
  3347. Some error returned by
  3348. \f(CWwaitpid()\fP
  3349. .IP "\fB22\fP"
  3350. Error allocating core memory buffers
  3351. .IP "\fB23\fP"
  3352. Partial transfer due to error
  3353. .IP "\fB24\fP"
  3354. Partial transfer due to vanished source files
  3355. .IP "\fB25\fP"
  3356. The \-\-max\-delete limit stopped deletions
  3357. .IP "\fB30\fP"
  3358. Timeout in data send/receive
  3359. .IP "\fB35\fP"
  3360. Timeout waiting for daemon connection
  3361. .PP
  3362. .SH "ENVIRONMENT VARIABLES"
  3363. .PP
  3364. .IP "\fBCVSIGNORE\fP"
  3365. The CVSIGNORE environment variable supplements any
  3366. ignore patterns in .cvsignore files. See the \fB\-\-cvs\-exclude\fP option for
  3367. more details.
  3368. .IP "\fBRSYNC_ICONV\fP"
  3369. Specify a default \fB\-\-iconv\fP setting using this
  3370. environment variable. (First supported in 3.0.0.)
  3371. .IP "\fBRSYNC_RSH\fP"
  3372. The RSYNC_RSH environment variable allows you to
  3373. override the default shell used as the transport for rsync. Command line
  3374. options are permitted after the command name, just as in the \fB\-e\fP option.
  3375. .IP "\fBRSYNC_PROXY\fP"
  3376. The RSYNC_PROXY environment variable allows you to
  3377. redirect your rsync client to use a web proxy when connecting to a
  3378. rsync daemon. You should set RSYNC_PROXY to a hostname:port pair.
  3379. .IP "\fBRSYNC_PASSWORD\fP"
  3380. Setting RSYNC_PASSWORD to the required
  3381. password allows you to run authenticated rsync connections to an rsync
  3382. daemon without user intervention. Note that this does not supply a
  3383. password to a remote shell transport such as ssh; to learn how to do that,
  3384. consult the remote shell\(cq\&s documentation.
  3385. .IP "\fBUSER\fP or \fBLOGNAME\fP"
  3386. The USER or LOGNAME environment variables
  3387. are used to determine the default username sent to an rsync daemon.
  3388. If neither is set, the username defaults to \(dq\&nobody\(dq\&.
  3389. .IP "\fBHOME\fP"
  3390. The HOME environment variable is used to find the user\(cq\&s
  3391. default .cvsignore file.
  3392. .PP
  3393. .SH "FILES"
  3394. .PP
  3395. /etc/rsyncd.conf or rsyncd.conf
  3396. .PP
  3397. .SH "SEE ALSO"
  3398. .PP
  3399. \fBrsyncd.conf\fP(5)
  3400. .PP
  3401. .SH "BUGS"
  3402. .PP
  3403. times are transferred as *nix time_t values
  3404. .PP
  3405. When transferring to FAT filesystems rsync may re\-sync
  3406. unmodified files.
  3407. See the comments on the \fB\-\-modify\-window\fP option.
  3408. .PP
  3409. file permissions, devices, etc. are transferred as native numerical
  3410. values
  3411. .PP
  3412. see also the comments on the \fB\-\-delete\fP option
  3413. .PP
  3414. Please report bugs! See the web site at
  3415. http://rsync.samba.org/
  3416. .PP
  3417. .SH "VERSION"
  3418. .PP
  3419. This man page is current for version 3.0.9 of rsync.
  3420. .PP
  3421. .SH "INTERNAL OPTIONS"
  3422. .PP
  3423. The options \fB\-\-server\fP and \fB\-\-sender\fP are used internally by rsync,
  3424. and should never be typed by a user under normal circumstances. Some
  3425. awareness of these options may be needed in certain scenarios, such as
  3426. when setting up a login that can only run an rsync command. For instance,
  3427. the support directory of the rsync distribution has an example script
  3428. named rrsync (for restricted rsync) that can be used with a restricted
  3429. ssh login.
  3430. .PP
  3431. .SH "CREDITS"
  3432. .PP
  3433. rsync is distributed under the GNU public license. See the file
  3434. COPYING for details.
  3435. .PP
  3436. A WEB site is available at
  3437. http://rsync.samba.org/. The site
  3438. includes an FAQ\-O\-Matic which may cover questions unanswered by this
  3439. manual page.
  3440. .PP
  3441. The primary ftp site for rsync is
  3442. ftp://rsync.samba.org/pub/rsync.
  3443. .PP
  3444. We would be delighted to hear from you if you like this program.
  3445. Please contact the mailing\-list at rsync@lists.samba.org.
  3446. .PP
  3447. This program uses the excellent zlib compression library written by
  3448. Jean\-loup Gailly and Mark Adler.
  3449. .PP
  3450. .SH "THANKS"
  3451. .PP
  3452. Special thanks go out to: John Van Essen, Matt McCutchen, Wesley W. Terpstra,
  3453. David Dykstra, Jos Backus, Sebastian Krahmer, Martin Pool, and our
  3454. gone\-but\-not\-forgotten compadre, J.W. Schultz.
  3455. .PP
  3456. Thanks also to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell
  3457. and David Bell. I\(cq\&ve probably missed some people, my apologies if I have.
  3458. .PP
  3459. .SH "AUTHOR"
  3460. .PP
  3461. rsync was originally written by Andrew Tridgell and Paul Mackerras.
  3462. Many people have later contributed to it. It is currently maintained
  3463. by Wayne Davison.
  3464. .PP
  3465. Mailing lists for support and development are available at
  3466. http://lists.samba.org