Commit | Line | Data |
---|---|---|
c627d613 AT |
1 | WHAT IS RSYNC? |
2 | -------------- | |
3 | ||
4 | rsync is a replacement for rcp that has many more features. | |
5 | ||
10ce5fbf | 6 | rsync uses the "rsync algorithm" which provides a very fast method for |
c627d613 AT |
7 | bringing remote files into sync. It does this by sending just the |
8 | differences in the files across the link, without requiring that both | |
9 | sets of files are present at one of the ends of the link beforehand. | |
10 | At first glance this may seem impossible because the calculation of | |
11 | diffs between two files normally requires local access to both | |
12 | files. | |
13 | ||
14 | A technical report describing the rsync algorithm is included with | |
c6e7fcb4 | 15 | this package. |
c627d613 AT |
16 | |
17 | ||
18 | USAGE | |
19 | ----- | |
20 | ||
21 | Basically you use rsync just like rcp, but rsync has many additional options. | |
22 | ||
dcc3a131 | 23 | Here is a brief description of rsync usage: |
c627d613 | 24 | |
9ef53907 | 25 | Usage: rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST |
dcc3a131 | 26 | or rsync [OPTION]... [USER@]HOST:SRC DEST |
9ef53907 | 27 | or rsync [OPTION]... SRC [SRC]... DEST |
dcc3a131 | 28 | or rsync [OPTION]... [USER@]HOST::SRC [DEST] |
9ef53907 | 29 | or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST |
dcc3a131 | 30 | or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST] |
9ef53907 DD |
31 | SRC on single-colon remote HOST will be expanded by remote shell |
32 | SRC on server remote HOST may contain shell wildcards or multiple | |
33 | sources separated by space as long as they have same top-level | |
dcc3a131 DD |
34 | |
35 | Options | |
36 | -v, --verbose increase verbosity | |
9ef53907 | 37 | -q, --quiet decrease verbosity |
dcc3a131 DD |
38 | -c, --checksum always checksum |
39 | -a, --archive archive mode | |
40 | -r, --recursive recurse into directories | |
41 | -R, --relative use relative path names | |
9ef53907 DD |
42 | -b, --backup make backups (default ~ suffix) |
43 | --suffix=SUFFIX override backup suffix | |
dcc3a131 DD |
44 | -u, --update update only (don't overwrite newer files) |
45 | -l, --links preserve soft links | |
46 | -L, --copy-links treat soft links like regular files | |
b5313607 | 47 | --copy-unsafe-links copy links outside the source tree |
dcc3a131 DD |
48 | --safe-links ignore links outside the destination tree |
49 | -H, --hard-links preserve hard links | |
50 | -p, --perms preserve permissions | |
51 | -o, --owner preserve owner (root only) | |
52 | -g, --group preserve group | |
53 | -D, --devices preserve devices (root only) | |
54 | -t, --times preserve times | |
55 | -S, --sparse handle sparse files efficiently | |
56 | -n, --dry-run show what would have been transferred | |
57 | -W, --whole-file copy whole files, no incremental checks | |
58 | -x, --one-file-system don't cross filesystem boundaries | |
9ef53907 | 59 | -B, --block-size=SIZE checksum blocking size (default 700) |
dcc3a131 DD |
60 | -e, --rsh=COMMAND specify rsh replacement |
61 | --rsync-path=PATH specify path to rsync on the remote machine | |
62 | -C, --cvs-exclude auto ignore files in the same way CVS does | |
63 | --delete delete files that don't exist on the sending side | |
b33b791e | 64 | --delete-excluded also delete excluded files on the receiving side |
dcc3a131 DD |
65 | --partial keep partially transferred files |
66 | --force force deletion of directories even if not empty | |
67 | --numeric-ids don't map uid/gid values by user/group name | |
68 | --timeout=TIME set IO timeout in seconds | |
69 | -I, --ignore-times don't exclude files that match length and time | |
a8b9d4ed | 70 | --size-only only use file size when determining if a file should be transferred |
dcc3a131 DD |
71 | -T --temp-dir=DIR create temporary files in directory DIR |
72 | --compare-dest=DIR also compare destination files relative to DIR | |
73 | -z, --compress compress file data | |
74 | --exclude=PATTERN exclude files matching PATTERN | |
75 | --exclude-from=FILE exclude patterns listed in FILE | |
76 | --include=PATTERN don't exclude files matching PATTERN | |
77 | --include-from=FILE don't exclude patterns listed in FILE | |
dcc3a131 DD |
78 | --version print version number |
79 | --daemon run as a rsync daemon | |
80 | --config=FILE specify alternate rsyncd.conf file | |
81 | --port=PORT specify alternate rsyncd port number | |
82 | --stats give some file transfer stats | |
83 | --progress show progress during transfer | |
84 | --log-format=FORMAT log file transfers using specified format | |
9ef53907 | 85 | --password-file=FILE get password from FILE |
dcc3a131 | 86 | -h, --help show this help screen |
c627d613 AT |
87 | |
88 | ||
9ef53907 | 89 | |
c627d613 AT |
90 | SETUP |
91 | ----- | |
92 | ||
eeb1568f MP |
93 | Rsync normally uses rsh or ssh for communication. It does not need to |
94 | be setuid and requires no special privileges for installation. You | |
95 | must, however, have a working rsh or ssh system. Using ssh is | |
96 | recommended for its security features. | |
97 | ||
98 | Alternatively, rsync can run in `daemon' mode, listening on a socket. | |
99 | This is generally used for public file distribution, although | |
100 | authentication and access control are available. | |
c627d613 AT |
101 | |
102 | To install rsync, first run the "configure" script. This will create a | |
103 | Makefile and config.h appropriate for your system. Then type | |
104 | "make". | |
105 | ||
debb4505 AT |
106 | Note that on some systems you will have to force configure not to use |
107 | gcc because gcc may not support some features (such as 64 bit file | |
108 | offsets) that your system may support. Set the environment variable CC | |
109 | to the name of your native compiler before running configure in this | |
110 | case. | |
111 | ||
c627d613 AT |
112 | Once built put a copy of rsync in your search path on the local and |
113 | remote systems (or use "make install"). That's it! | |
114 | ||
e095b568 AT |
115 | RSYNC SERVERS |
116 | ------------- | |
117 | ||
118 | rsync can also talk to "rsync servers" which can provide anonymous or | |
ed06894a | 119 | authenticated rsync. See the rsyncd.conf(5) man page for details on how |
e095b568 AT |
120 | to setup a rsync server. See the rsync(1) man page for info on how to |
121 | connect to a rsync server. | |
122 | ||
c627d613 | 123 | |
432b0fbd AT |
124 | MAILING LIST |
125 | ------------ | |
126 | ||
127 | There is a mailing list for the discussion of rsync and its | |
128 | applications. It is open to anyone to join. I will announce new | |
129 | versions on this list. | |
130 | ||
d153974e | 131 | To join the mailing list see the web page at http://lists.samba.org/ |
432b0fbd | 132 | |
9e3c856a | 133 | To send mail to everyone on the list send it to rsync@samba.org |
432b0fbd AT |
134 | |
135 | ||
e92338c8 AT |
136 | BUG REPORTS |
137 | ----------- | |
138 | ||
139 | If you have web access then please look at | |
9e3c856a | 140 | http://rsync.samba.org/rsync/ |
e92338c8 AT |
141 | |
142 | This will give you access to the bug tracking system used by the | |
143 | developers of rsync and will allow you to look at other bug reports or | |
144 | submit a new bug report. | |
145 | ||
146 | If you don't have web access then mail bug reports to | |
9e3c856a AT |
147 | rsync-bugs@samba.org or (if you think it will be of interest to lots |
148 | of people) send it to rsync@samba.org | |
e92338c8 AT |
149 | |
150 | ||
527cea66 AT |
151 | CVS TREE |
152 | -------- | |
153 | ||
154 | If you want to get the very latest version of rsync direct from the | |
155 | source code repository then you can use anonymous cvs. You will need a | |
156 | recent version of cvs then use the following commands: | |
157 | ||
eeb1568f | 158 | cvs -d :pserver:cvs@pserver.samba.org:/cvsroot login |
527cea66 AT |
159 | Password: cvs |
160 | ||
eeb1568f | 161 | cvs -d :pserver:cvs@pserver.samba.org:/cvsroot co rsync |
527cea66 | 162 | |
eeb1568f MP |
163 | Look at the cvs documentation, or http://samba.org/cvs.html, for more |
164 | details. | |
527cea66 AT |
165 | |
166 | ||
c627d613 AT |
167 | COPYRIGHT |
168 | --------- | |
169 | ||
170 | Rsync was written by Andrew Tridgell and Paul Mackerras, and is | |
eeb1568f | 171 | available under the GNU General Public License. |
c627d613 | 172 | |
9e3c856a | 173 | tridge@samba.org |
c627d613 AT |
174 | paulus@cs.anu.edu.au |
175 | ||
176 | ||
177 | AVAILABILITY | |
178 | ------------ | |
179 | ||
9e3c856a AT |
180 | The main web site for rsync is http://rsync.samba.org/ |
181 | The main ftp site is ftp://rsync.samba.org/pub/rsync/ | |
182 | This is also available as rsync://rsync.samba.org/rsyncftp/ |