Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What happens if... #24

Open
bertalanimre opened this issue Jan 12, 2018 · 0 comments
Open

What happens if... #24

bertalanimre opened this issue Jan 12, 2018 · 0 comments

Comments

@bertalanimre
Copy link

Hey Andreas,

Awesome trick you've done here. May I ask you what would happen in the following situation?

I wish to do a 2-way-file sync between two NFS servers. Now for this I could use only your watcher, but I would like to use something that is a bit more sophisticated than triggering scp commands. I was thinking about unison. Easy to use and easy to set up, and still does a pretty good job. However I want to trigger it with watcher and on file create events.

Now I want an upload folder to be watched and clone the files to the other backup server when they are uploaded. What happens with the following event line?

  • User starts uploading a 2 GB file
  • My webapplication starts receiving the file and creates it in the uploads folder
  • A file is created but obviously with not all the data yet.

My question is: Is watcher going to get triggered by this broken file as well or it is intelligent enough to wait until the upload is finished? If not, then....

  • User uploads the file
  • The webapp, when the upload is ready, can copy the file to a different folder
  • Watcher can watch that different folder and when the file is copied then it can trigger unison

What do you think? Is the first method working or am I forced to use the 2nd option?

Thanks in advance!

Bert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant