OSX Equivalent WinSCP Fully Automated SFTP Local Remote Sync?

I enjoy working with WinSCP and using the fully automated local to remote synchronization feature, where the application will keep track of the directory hierarchy and push changes to the remote server as they occur.

Does OSX have an application that does the same thing? I couldn't find anything. When I find something promising, it always turns out to be a traditional sync app where you have to run a sync command manually and then scan the hierarchy to find the changed files. It is too time consuming and not automated.

Looked at the filesystem API , wondering if a small application could be copied along with a small utility to trigger hierarchy changes and load the changed directory into rsync or something.

Thanks for any links!

+2


source to share


3 answers


There are two Mac-specific utilities that you can use to simplify your work:



Both tools have AppleScript as a common thread (which can be used to execute shell commands). You might be able to write a little AppleScript that runs when the folder changes invocation rsync

and performs the required service.

+2


source


Well I had the same problem and this can be used together: rsync, SSH Passwordless Login, Watchdog (Python sync utility) and Terminal Notifier (OS X notification utility made with Ruby. Not required but helps to know when sync is complete ).



  • I created a key for passwordless login using this tutorial from Dreamhost wiki: http://cl.ly/MIw5

    1.1. When you're done, check if everything is ok ... if you can't login without logging in, you may have to try afp mount. Dreamhost (where my site is) doesn't allow afp mount, but it does allow login without password. In terminal enter:

    ssh username@host.com

    You must login without asking for a password: P

  • I installed Terminal Notifier from the Github page: http://cl.ly/MJ5x

    2.1. I used the Gem install command. In terminal enter:

    gem install terminal-notifier

    2.3. Check if the notification is working. In terminal enter:

    terminal-notifier -message "Starting sync"

  • Create a sh script to test the rsync + notification. Save it anywhere you like. In this example, I will call it ~ / the Scripts / sync.sh . I used the .sh extension but don't know if I need it.

    #!/bin/bash terminal-notifier -message "Starting sync" rsync -azP ~/Sites/folder/ user@host.com:site_folder/ terminal-notifier -message "Sync has finished"

    3.1. Don't forget to grant execution permission to this sh script. In terminal enter:

    sudo chmod 777 ~/Scripts/sync.sh

     3.2. Run the script and check if the messages are displayed correctly and rsync will actually sync your local folder with the remote folder.

  • Finally, I downloaded and installed Watchdog from the Github page: http://cl.ly/MJfb

    4.1. First, I installed the libyaml dependency using Brew (there are many tips on how to install Brew - like "aptitude" for OS X). In terminal enter:

    brew install libyaml

    4.2. Then I used the easy_install command. Go to the Watchdog folder and type Terminal:

    easy_install watchdog

  • Everything is now set! Go to the folder you want to sync , change this code to your needs and type in terminal:

      watchmedo shell-command
          --patterns="*.php;*.txt;*.js;*.css" \
          --recursive \
          --command='~/Scripts/Sync.sh' \
          .
    
          

    It has to be EXACTLY this way, with slashes and line breaks, so you'll have to copy those lines into a text editor, change the script, paste in a terminal, and hit return.

    I tried without line breaks and it doesn't work!

    On my Mac, I always get an error, but this does not affect at all:

    /Library/Python/2.7/site-packages/argh-0.22.0-py2.7.egg/argh/completion.py:84: UserWarning: Bash completion not available. Install argcomplete.

    Now let's make some changes to the file inside the folder and let's see the magic!

+1


source


I believe the transmission does this.

0


source







All Articles