A two way filesync script running on bash Llinux, BSD, Android, MacOSX, Cygwin, MSYS2, Win10 bash and virtually any system supporting bash). File synchronization is bidirectional, and can be run manually, as scheduled task, or triggered on file changes in deamon mode. It is a command line tool rsync wrapper with a lot of additional features baked in.
osync alternatives and similar software solutions
Based on the "File Sharing and Synchronization" category.
Alternatively, view osync alternatives based on common mentions on social networks and blogs.
9.5 9.9 osync VS SeaweedFSSeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! Blob store has O(1) disk seek, cloud tiering. Filer supports Cloud Drive, cross-DC active-active replication, Kubernetes, POSIX FUSE mount, S3 API, S3 Gateway, Hadoop, WebDAV, encryption, Erasure Coding. [Moved to: https://github.com/seaweedfs/seaweedfs]
9.2 5.0 L3 osync VS SeafileHigh performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
8.4 9.7 L3 osync VS OnionShareSecurely and anonymously share files, host websites, and chat with friends using the Tor network
8.4 7.9 osync VS CamlistorePerkeep (née Camlistore) is your personal storage system for life: a way of storing, syncing, sharing, modelling and backing up content.
8.3 9.5 L2 osync VS GlusterFSGluster Filesystem : Build your distributed storage in minutes
8.0 8.8 L2 osync VS SwiftOpenStack Storage (Swift). Mirror of code maintained at opendev.org.
7.9 8.7 L3 osync VS KintoA generic JSON document store with sharing and synchronisation capabilities.
7.6 7.9 L5 osync VS instant.io🚀 Streaming file transfer over WebTorrent (torrents on the web)
6.9 6.7 osync VS DirectoryLister📂 Directory Lister is the easiest way to expose the contents of any web-accessible folder for browsing and sharing.
6.7 0.0 L4 osync VS ShareFestWeb based p2p file sharing built on WebRTC Data Channels API
6.7 0.0 L3 osync VS SyncanySyncany is a cloud storage and filesharing application with a focus on security and abstraction of storage.
6.4 6.2 L4 osync VS bittorrent-tracker🌊 Simple, robust, BitTorrent tracker (client & server) implementation
6.3 0.0 L5 osync VS YouTransferThe simple but elegant self-hosted file transfer & sharing solution
6.0 3.6 osync VS linxSelf-hosted file/code/media sharing website. ~~~~~~~~~~~~~~~~~~~ Demo: https://demo.linx-server.net/ [Moved to: https://github.com/linx-server/linx-server]
5.9 10.0 L2 osync VS Sambahttps://gitlab.com/samba-team/samba is the Official GitLab mirror of https://git.samba.org/samba.git -- Merge requests should be made on GitLab (not on GitHub)
5.8 0.0 L5 osync VS ipfs.picsContent-addressable, peer-to-peer method of storing and sharing images on the internet.
5.8 8.2 L2 osync VS ProjectSendProjectSend is a free, open source software that lets you share files with your clients, focused on ease of use and privacy. It supports clients groups, system users roles, statistics, multiple languages, detailed logs... and much more!
5.7 2.8 osync VS ChibisafeBlazing fast file uploader and awesome bunker written in node! 🚀
4.9 6.6 L2 osync VS PictShare:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of osync or a related project?
A two way filesync script running on bash Linux, BSD, Android, MacOSX, Cygwin, MSYS2, Win10 bash and virtually any system supporting bash). File synchronization is bidirectional, and can be run manually, as scheduled task, or triggered on file changes in daemon mode. It is a command line tool rsync wrapper with a lot of additional features baked in.
This is a quickstart guide, you can find the full documentation on the author's site.
osync provides the following capabilities
- Local-Local and Local-Remote sync
- Fault tolerance with resume scenarios
- POSIX ACL and extended attributes synchronization
- Full script Time control
- Soft deletions and multiple backups handling
- Before / after run command execution
- Email alerts
- Logging facility
- Directory monitoring
- Running on schedule or as daemon
- Batch runner for multiple sync tasks with rerun option for failed sync tasks
osync is a stateful synchronizer. This means it's agentless and doesn't have to monitor files for changes. Instead, it compares replica file lists between two runs. A full run takes about 2 seconds on a local-local replication and about 7 seconds on a local-remote replication. Disabling some features file like attributes preservation and disk space checks may speed up execution. osync uses a initiator / target sync schema. It can sync local to local or local to remote directories. By definition, initiator replica is always a local directory on the system osync runs on. osync uses pidlocks to prevent multiple concurrent sync processes on/to the same initiator / target replica. You may launch concurrent sync processes on the same system but as long as the replicas to synchronize are different. Multiple osync tasks may be launched sequentially by osync osync-batch tool.
Currently, it has been tested on CentOS 5.x, 6.x, 7.x, Fedora 22-25, Debian 6-8, Linux Mint 14-18, Ubuntu 12.04-12.10, FreeBSD 8.3-11, Mac OS X, QTS 4.5.1(x86) and pfSense 2.3.x. Microsoft Windows is supported via MSYS or Cygwin and now via Windows 10 bash. Android support works via Termux. Some users also have successfully used osync on Gentoo and created an openRC init scriptt for it.
osync has been designed to not delete any data, but rather make backups of conflictual files or soft deletes. Nevertheless, you should always have a neat backup of your data before trying a new sync tool.
You may get osync on github (stable or latest dev snapshot) or on the author's site (stable version) Getting osync via author's site on https://www.netpower.fr/osync
$ wget http://www.netpower.fr/projects/osync/osync.v1.2.tar.gz $ tar xvf osync.v1.2.tar.gz
Getting osync via github (remove the -b "stable" if you want latest dev snapshot)
$ git clone -b "stable" https://github.com/deajan/osync $ cd osync $ bash install.sh
Installer script accepts some parameters for automation. Launch install.sh --help for options.
There is also a RPM file that should fit RHEL/CentOS/Fedora and basically any RPM based distro, see the github release. Please note that RPM files will install osync to /usr/bin instead of /usr/local/bin in order to enforce good practices.
osync will install itself to /usr/local/bin and an example configuration file will be installed to /etc/osync
osync needs to run with bash shell. Using any other shell will most probably result in errors. If bash is not your default shell, you may invoke it using
$ bash osync.sh [options]
On *BSD and BusyBox, be sure to have bash installed.
If you can't install osync, you may just copy osync.sh where you needed and run it from there.
Upgrade from previous configuration files
Since osync v1.1 the config file format has changed in semantics and adds new config options. Also, master is now called initiator and slave is now called target. osync v1.2 also added multiple new configuration options.
You can upgrade all v1.0x-v1.2-dev config files by running the upgrade script
$ ./upgrade-v1.0x-v1.2x.sh /etc/osync/your-config-file.conf
The script will backup your config file, update it's content and try to connect to initiator and target replicas to update the state dir.
Osync can work with in three flavors: Quick sync mode, configuration file mode, and daemon mode. While quick sync mode is convenient to do fast syncs between some directories, a configuration file gives much more functionnality. Please use double quotes as path delimiters. Do not use escaped characters in path names.
# osync.sh --initiator="/path/to/dir1" --target="/path/to/remote dir2" # osync.sh --initiator="/path/to/another dir" --target="ssh://[email protected]:22//path/to/dir2" --rsakey=/home/user/.ssh/id_rsa_private_key_example.com
osync may output only file changes and errors with the following
# osync.sh --initiator="/path/to/dir1" --target="/path/to/dir" --summary --errors-only --no-prefix
This also works in configuration file mode.
QuickSync with minimal options
In order to run osync the quickest (without transferring file attributes, without softdeletion, without prior space checks and without remote connectivity checks, you may use the following:
# MINIMUM_SPACE=0 PRESERVE_ACL=no PRESERVE_XATTR=no SOFT_DELETE_DAYS=0 CONFLICT_BACKUP_DAYS=0 REMOTE_HOST_PING=no osync.sh --initiator="/path/to/another dir" --target="ssh://[email protected]:22//path/to/dir2" --rsakey=/home/user/.ssh/id_rsa_private_key_example.com
All the settings described here may also be configured in the conf file.
Running osync with a Configuration file
You'll have to customize the sync.conf file according to your needs. If you intend to sync a remote directory, osync will need a pair of private / public RSA keys to perform remote SSH connections. Also, running sync as superuser requires to configure /etc/sudoers file. Please read the documentation about remote sync setups. Once you've customized a sync.conf file, you may run osync with the following test run:
# osync.sh /path/to/your.conf --dry
If everything went well, you may run the actual configuration with one of the following:
# osync.sh /path/to/your.conf # osync.sh /path/to/your.conf --verbose # osync.sh /path/to/your.conf --no-maxtime
Verbose option will display which files and attrs are actually synchronized and which files are to be soft deleted / are in conflict. You may mix "--silent" and "--verbose" parameters to output verbose input only in the log files. No-Maxtime option will disable execution time checks, which is usefull for big initial sync tasks that might take long time. Next runs should then only propagate changes and take much less time.
Once you're confident about your first runs, you may add osync as a cron task like the following in /etc/crontab which would run osync every 30 minutes:
*/30 * * * * root /usr/local/bin/osync.sh /etc/osync/my_sync.conf --silent
Please note that this syntax works for RedHat / CentOS. On Debian you might want to remove the username (ie root) in order to make the crontab entry work.
You may want to sequentially run multiple sync sets between the same servers. In that case, osync-batch.sh is a nice tool that will run every osync conf file, and, if a task fails, run it again if there's still some time left. The following example will run all .conf files found in /etc/osync, and retry 3 times every configuration that fails, if the whole sequential run took less than 2 hours.
# osync-batch.sh --path=/etc/osync --max-retries=3 --max-exec-time=7200
Having multiple conf files can then be run in a single cron command like
00 00 * * * root /usr/local/bin/osync-batch.sh --path=/etc/osync --silent
Additionaly, you may run osync in monitor mode, which means it will perform a sync upon file operations on initiator replica. This can be a drawback on functionnality versus scheduled mode because this mode only launches a sync task if there are file modifications on the initiator replica, without being able to monitor the target replica. Target replica changes are only synced when initiator replica changes occur, or when a given amount of time (default 600 seconds) passed without any changes on initiator replica. File monitor mode can also be launched as a daemon with an init script. Please read the documentation for more info. Note that monitoring changes requires inotifywait command (inotify-tools package for most Linux distributions). BSD, MacOS X and Windows are not yet supported for this operation mode, unless you find a inotify-tools package on these OSes.
# osync.sh /etc/osync/my_sync.conf --on-changes
Osync file monitor mode may be run as system service with the osync-srv script. You may run the install.sh script which should work in most cases or copy the files by hand (osync.sh to /usr/bin/local, sync.conf to /etc/osync, osync-srv to /etc/init.d for initV, [email protected] to /usr/lib/systemd/system for systemd, osync-srv-openrc to /etc/init.d/osync-srv-openrc for OpenRC).
InitV specific instructions:
Any configuration file found in /etc/osync will create a osync daemon instance when service is launched on initV with: $ service osync-srv start $ chkconfig osync-srv on
Systemd specific (one service per config file)
Launch service (one service per config file to launch) with: $ systemctl start [email protected] $ systemctl enable [email protected]
OpenRC specific instructions (user contrib)
Launch service (one service per config file to launch) with: $ rc-update add osync-srv.configfile default
Remote SSH connection security can be improved by limiting what hostnames may connect, disabling some SSH options and using ssh filter. Please read full documentation in order to configure ssh filter.
All kind of contribs are welcome.
When submitting a PR, please be sure to modify files in dev directory (dev/n_osync.sh, dev/ofunctions.sh, dev/common_install.sh etc) as most of the main files are generated via merge.sh. When testing your contribs, generate files via merge.sh or use bootstrap.sh which generates a temporary version of n_osync.sh with all includes.
Unit tests are run by travis on every PR, but you may also run them manually which adds some tests that travis can't do, via dev/tests/run_tests.sh SSH port can be changed on the fly via environment variable SSH_PORT, eg: SSH_PORT=2222 dev/tests/run_tests.sh
Consider reading CODING_CONVENTIONS.TXT before submitting a patch.
You may find osync's logs in
/var/log/osync.[INSTANCE_ID].log (or current directory if /var/log is not writable).
Additionnaly, you can use the --verbose flag see to what actions are going on.
When opening an issue, please post the corresponding log files. Also, you may run osync with _DEBUG option in order to have more precise logs, eg: _DEBUG=yes ./osync.sh /path/to/conf
The installer script also has an uninstall mode that will keep configuration files. Use it with
$ ./install.sh --remove
Feel free to open an issue on github or mail me for support in my spare time :) Orsiris de Jong | [email protected]
*Note that all licence references and agreements mentioned in the osync README section above are relevant to that project's source code only.