Qnap and osync
Here i'll tell you a way to install Osync on Windows and run it to synchronize with a Qnap rsync server
Install osync
Cygwin
- Install Cygwin
- Add the following packages to Cygwin
- mutt
- openssh
- procps-ng
- rsync
- sshpass
- wget
- git
- dos2unix
- Start cygwin shell and install osync
- git clone -b "stable" https://github.com/deajan/osync.git (or https://github.com/kendarorg/osync.git if you want the qnap compatible at once)
- dos2unix osync/*.sh
- dos2unix osync/dev/*.sh
- cd osync
- ./install.sh
Qnap side
- Install the Hybrid Bakup Sync on Qnap and open it
- Enable the rsync daemon on the "Services" tab
- On the rsync daemon Check the "Access with local QTS accounts" check
Remote sync (via ssh)
Under your home dir (let's say /home/myname ) prepare a password file. This is not as secure as with the shared key but very easy
echo MYPASSWORD > /home/myname/osync.pwd
Now run the command. Please note that the ssh parts are "ssh://login@host//fullpath"
- --password-file: the full path to the password file
- --initiator: the source directory (the content of)
- --target: the destination directory (the content of)
osync.sh --password-file=/home/myname/osync.pwd --initiator="/cygdrive/c/ToBackup" --target="ssh://admin@192.168.1.1:22//share/ToBackup"
For further instructions see https://github.com/deajan/osync
Last modified on: November 04, 2020