128 lines
4.0 KiB
HTML
128 lines
4.0 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>synctree(1)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>synctree(1)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
synctree - synchronize directory trees.
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>synctree</STRONG> [<STRONG>-iuf</STRONG>] [[<EM>user1</EM>@]<EM>machine1</EM>:]<EM>dir1</EM> [[<EM>user2</EM>@]<EM>machine2</EM>:]<EM>dir2</EM>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Synctree</STRONG> synchronizes the directory tree rooted at <EM>dir2</EM> with <EM>dir1</EM>. It
|
|
walks recursively through both trees, and deletes and adds files in <EM>dir2</EM>
|
|
to make it equal to <EM>dir1</EM>. Mode, owner and group are set for each file
|
|
unless the <STRONG>-u</STRONG> flag is given. In its normal mode of operation, synctree
|
|
will ask if it may delete or add directories assuming that you don't want
|
|
to. Non-directories are simply deleted or added, but synctree will ask if
|
|
it needs to update a normal file with a default answer of 'y'. Simply
|
|
typing return will choose the default answer, typing end-of-file is like
|
|
typing return to this question and all other questions.
|
|
|
|
You can specify a hostname and user-id to be used to access <EM>dir1</EM> or <EM>dir2</EM>.
|
|
Synctree will use <STRONG><A HREF="../man1/rsh.1.html">rsh(1)</A></STRONG> to run a copy of itself on the remote machine.
|
|
The call interface mimics that of <STRONG><A HREF="../man1/rcp.1.html">rcp(1)</A></STRONG>, but you can use more than one
|
|
user@machine prefix if you want to make things really interesting.
|
|
|
|
Hard links are enforced, an update is done by first deleting the old file
|
|
so that links to unknown files are broken. Links to files within <EM>dir2</EM>
|
|
will be restored.
|
|
|
|
If either directory contains the file <STRONG>.backup</STRONG>, then this file will be
|
|
used as an alternate inode table. This allows one to make a backup copy
|
|
of a file tree full of special files and differing user-ids on a remote
|
|
machine under an unpriviledged user-id.
|
|
|
|
|
|
</PRE>
|
|
<H2>OPTIONS</H2><PRE>
|
|
|
|
<STRONG>-i</STRONG> Ask for permission (with default answer 'n') to delete or add any
|
|
file or directory.
|
|
|
|
<STRONG>-u</STRONG> Only install newer files, i.e. merge the directory trees.
|
|
|
|
<STRONG>-f</STRONG> Don't ask, think 'yes' on any question.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man1/remsync.1.html">remsync(1)</A></STRONG>, <STRONG><A HREF="../man1/cpdir.1.html">cpdir(1)</A></STRONG>, <STRONG><A HREF="../man1/rsh.1.html">rsh(1)</A></STRONG>, <STRONG><A HREF="../man1/rcp.1.html">rcp(1)</A></STRONG>, <STRONG><A HREF="../man3/perror.3.html">perror(3)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>DIAGNOSTICS</H2><PRE>
|
|
Messages may come from three different processes. One named "Slave"
|
|
running in <EM>dir1</EM>, one named "Master" running in <EM>dir2</EM>, and synctree itself
|
|
in a mediator role. The mediator will also perform the task of either
|
|
the master or the slave if one of them is running locally. You need to
|
|
know this to interpret the error messages coming from one of these
|
|
processes. The messages are normally based on <STRONG><A HREF="../man3/perror.3.html">perror(3)</A></STRONG>. Failure to
|
|
contact a remote machine will be reported by <STRONG>rsh</STRONG>. <STRONG>Synctree</STRONG> should have a
|
|
zero exit status if no errors have been encountered.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
Directory <EM>dir2</EM> will be created without asking.
|
|
|
|
The master and slave processes get their error output mixed up sometimes
|
|
(nice puzzle).
|
|
|
|
The local and remote machine must use the same file type encoding.
|
|
|
|
The link replacement strategy may lead to lack of space on a small
|
|
device. Let <STRONG>synctree</STRONG> run to completion and then rerun it to pick up the
|
|
pieces.
|
|
|
|
Letting the local process keep its "synctree" name may be a mistake.
|
|
|
|
It talks too much.
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Kees J. Bot, (kjb@cs.vu.nl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|