SYNOPSIS

dsync [-n] [-q | -d] [-x pathname]... pathname pathname

dsync [-n] [-q | -d] [-x pathname]... [-s pathname]

dsync [-n] [-q | -d] [-x pathname]... [-m pathname] pathname

dsync -h

dsync -v

(See the OPTIONS section for alternate option syntax with long option names.)


DESCRIPTION

dsync synchronizes contents of two directories. dsync remembers state between invocations and tries to track and reconcile changes between successive runs and between independent synchronizations of multiple targets (local and backup, local and remote, etc.).

While dsync will normally consider bidirectional changes, it may also mirror one directory to another if a master directory is specified. Such may be used for backups or to force conflict resolution.

Alternatively, dsync may be invoked to simply update state of a given directory in order to reset state from a previous run or to update a given directory to current.

Options

-n, --simulation
Merely print what will be done, but don't actually do it; directories and state snapshots remain unaffected.

-q, --quiet
Suppress all but the most critical output.

-d, --debug
Describe state and actions at appropriate points during execution.

-x pathname, --ignore pathname
Ignore indicated item during processing. Repeat this option to list multiple items.

-r, --remote
Hint that a directory being synchronized is on a remote volume and that not all file attributes are accurate or accessible. Forgo some attribute related operations but still reflect them in the saved snapshot.

-l pathname, --lax pathname
Option to ignore any attribute changes on the secondary side. This behavior may be useful when backing up to foreign file systems as attrbiutes such as permissions, ownership, time, and type may not be accurately preserved. Only changes in size of files on the secondary side matter. This option is more extreme than --remote

-s pathname, --snapshot pathname
Take a snapshot of the indicated directory.

-m pathname, --master pathname
Treat the indicated directory as the master copy and mirror its content in the secondary directory.

-v, -V, --version
Print version information and exit.

-h, -H, --help
Print this terse manual and exit.


EXAMPLE

To synchronize a local Documents directory and a remotely mounted analog, invoke via:

sudo dsync ~user/Documents /Volumes/user/Documents

assuming that the user has identically named accounts on both machines and that the user's remote home directory was mounted locally.


FILES

.dsync.db
Berkeley DB Hash file used to store states of files between executions.


REQUIRES

Perl 5.6, Getopt::Long, Fcntl, POSIX, DB_File, File::Basename, MacOSX::File, MacOSX::File::Copy, MacOSX::File::Info


SEE ALSO

perl(1)


BUGS

This is an early release; it has not been tested comprehensively.

Send bug reports, questions, and requests to dsync@ayradyss.org.

Mac OS X obfuscates some file attributes and prevents updates to volumes mounted via AFP. Dsync requires the --remote hint in order to ignore fallacious attributes and to skip operations that would otherwise fail. A future version may support a special ``snapshot restore'' mode that will allow Dsync to properly reset attributes when invoked locally after a remote synchronization run.


AUTHOR

Igor S. Livshits <dsync@ayradyss.org>


COPYRIGHT

Copyright (C) 2006 Igor S. Livshits

Use and distribute this tool as per the Artistic License