Fast file backup and mirroring

Overview

OneWaySynchronize is a Windows command line tool for backing up files from A (source) to B (destination). It will make sure that B is an exact copy of A, by copying files and overwriting and deleting files on B. The original A files are never modified in any way. This is called one-way-synchronization or file mirroring. See Wikipedia: File synchronization. For each run on the same A-B pair, only changes since last run are applied to B. It operates very fast and has good logging facilities.

OneWaySynchronize is particularly suitable for personal file backup, when used with portable hard drives, USB flash drives, your home NAS or other server shares.

OneWaySynchronize screenshot

Operation

OneWaySynchronize works by comparing file timestamps and sizes. If one of these differs from a destination file, the source file will be copied. Hidden or system files and directories will never be copied. OneWaySynchronize always operates recursively, it will traverse every subdirectory under the selected source directory. Renaming of files will not be detected. On the destination the file with the old name is simply deleted and the renamed file is copied again. The same goes for directories.

Usage

OneWaySynchronize Source Destination [Options]
Source Required. The directory containing the files you want to backup. A full path must be specified. Relative paths are not allowed. The directory must exist and can not be located within Destination. All files and subdirectories within Source will be recursively copied to Destination. Source is always treated read-only and files will never be changed or deleted.
Destination Required. The directory that receives a copy of the files from Source. A full path must be specified. Relative paths are not allowed. The directory must exist and can not be located within Source. Any file or directory within Destination may be deleted or overwritten in order to make it similar to Source. Never store any original files at this location.
/ID:name[;name] Include directories. Name of one or more subdirectories to exclusively include. Name only, no path. Separate multiple names with semicolon. Wildcards * and ? are allowed. All subdirectories in Source are included in the backup by default. This parameter limits this to the listed directory patterns.
/IF:name[;name] Include files. Name of one or more files to exclusively include. Name only, no path. Separate multiple names with semicolon. Wildcards * and ? are allowed. All files in Source are included in the backup by default. This parameter limits this to the listed file patterns.
/ED:name[;name] Exclude directories. Name of one or more subdirectories to exclude. Name only, no path. Separate multiple names with semicolon. Wildcards * and ? are allowed. No subdirectories are excluded by default. Excludes have higher priority than includes.
/EF:name[;name] Exclude files. Name of one or more files to exclude. Name only, no path. Separate multiple names with semicolon. Wildcards * and ? are allowed. No files are excluded by default. Excludes have higher priority than includes.
/NA No attribute reset. By default file attributes on Destination are reset to normal.
/ND No delete. Do not delete any files or directories on Destination.
/NW No overwrite. Do not overwrite existing files on Destination.
/TD:seconds Time difference. Maximum allowed difference for Source and Destination timestamps to be considered equal. Different file systems have different resolutions for timestamps. Default is 2 seconds which is lowest common denominator from the FAT file system.
/LQ Quiet. Don't log file operations to display. Errors are still displayed (on stdout).
/LO:filename Log overwrite. Log file operations to a new file. Overwrite filename if it exists.
/LA:filename Log append. Log file operations to a file. Append to filename if it exists.

Include/exclude

When specifying file or directory names to include or exclude, you can prepend a name with a backslash (see first example). This will make the include/exclude apply to files/directories directly under Source only and not further down the directory hierarchy. If you limit a former full synchronization, the files that are no longer included will be deleted on Destination.

Examples

OneWaySynchronize D:\ F:\Drive_D /ED:\NoSync OneWaySynchronize %USERPROFILE% G: OneWaySynchronize D:\PhotoAlbum \\NAS\Backup\PhotoAlbum OneWaySynchronize H:\Projects %USERPROFILE%\Projects /EF:*.bak;*.~* OneWaySynchronize C:\Users\TM\Music \\MediaCenter\Music /IF:*.mp3;*.flac

Download

Warning: Incorrect use of this software may delete your files. Use at your own risk! OneWaySynchronize is open source under the Zlib License.

Version 0.9, 11-Mar-2015, for Windows XP, Vista, 7, 8.x, 10 – 32 and 64 bit.
Copyright © 2008-2015 Thomas Munk.