2

Is there anyway to automatically sync between files from local machine to server?

ex) There's a folder called wug both in server and local machine. If I add file to folder wug in local machine, when I ssh into server, I will be able to find a file I added through local machine

I've been using scp in order to move files but wondering if it's possible to sync it automatically without using any commends.

Thanks

muru
  • 207,228

1 Answers1

1

You could either sync them, or mount the files.

If you decide to sync them, you're going to have to distribute the files to each server. Are the files updated frequently? Are the updates large in size? Will there be many, many servers in need of the files? Depending on your end goal, there are a variety of solutions:

  1. bittorent sync
  2. rsync on filechange
  3. ownCloud

If the files won't be changing frequently, or you want to be able to change/modify/write to files on both machines, you may want to mount the remote directory locally. You could use sshfs and set up /etc/fstab for a more permanent solution.

earthmeLon
  • 11,658