gruangly
gruangly

Reputation: 972

How to selectively sync using sshfs?

Original question: Let's say I have a remote folder with .R, .py and .pkl files. How to avoid syncing .pkl files or how to sync .R files only? How to avoid syncing specific sub-folders?

Sorry I was wrong on my understanding. sshfs is not a sync utility but is a software to mount a remote system to a local folder accessible via SSH.

I am not deleting this question so that it helps the future readers.

Now, my next question would be: how to selectively block sub-folders in the remote folder from being shown in the local folder? how to selectively block sub-folders in the local folder from being updated in the remote folder?

Upvotes: 0

Views: 2025

Answers (1)

po_taka
po_taka

Reputation: 1856

You can mount with --bind option needed directories. Mount will exclude them from sshfs. \For example if you have mounted dir in /var/www/site/ via

sshfs /var/www/site

Then you can mount the cache dir locally

mount /var/www/site/cache /tmp/site1cahe --bind

And cache will be local-only :)

Upvotes: 2

Related Questions