Unisync is a command-line tool for continuous 2-way syncing between a folder on your computer and a folder on a remote server. It's meant for using a local text editor to do development on your remote VPS. It normally connects over SSH, but it doesn't have to.
While connected, it will watch the directories on both sides and continuously sync changes in both directions. If you go offline (or quit unisync) and then later reconnect, it will "catch up" all of the changes that happened.
For more details, see How does unisync work, exactly?
You must install unisync locally and remotely. You then create a config file for your connection on the local side, and run it to have it connect to the remote side. It connects over SSH by default, so you must have an SSH public key already in place.
Go to the Download Page and follow the instructions to install unisync on the local and remote sides. For example, if you're on a Mac laptop connecting to a Linux VPS, you would follow the Mac instructions for your laptop, and then SSH into your VPS and follow the Linux instructions to install it there.
Your config files always live on the local side. Let's create a simple config file. We'll call it test.conf and we'll put it in the
~/.unisync folder locally.
mkdir -p ~/.unisync cd ~/.unisync nano test.conf
Now paste this into the file:
local = /Users/nick/mydir remote = /home/nick/mydir user = nick host = 220.127.116.11 ignore = .git
Replace the username and IP with the ones you use to SSH into your remote server. Replace the local and remote paths appropriately. We also added an ignore line so that your .git folder doesn't get synced. That's optional-- we're just demonstrating how to exclude files or directories from syncing. There are actually plenty more options you could add, but we can worry about that later.
When you're done, save the file and exit.
Now we're ready to run unisync locally. It'll connect to the remote copy we installed before and do its thing until you exit. Since we called our config file test.conf earlier, we'll invoke it with "test" (the .conf is optional). You can call it anything you want, though.
Now that you're up and running, look over our documentation.