How to make rsync run automatically when a new file or directory is added?

6,441

Solution 1

I used the "script-torrent-done" options in transmission's settings.json and pointed that to a script which syncs the home-server Downloaded torrents' file with my laptop.

Solution 2

What you're looking for is inotifywait, from the inotify-tools package, which uses the inotify mechanism.

reference:
http://blog.lagentz.com/general/automate-your-shell-scripts-using-inotify-and-inotifywait/
http://linux.die.net/man/1/inotifywait

Share:
6,441

Related videos on Youtube

Danial Behzadi
Author by

Danial Behzadi

Ubuntu Official member Ubuntu Iranian LoCo team member https://launchpad.net/~dani.behzi

Updated on September 18, 2022

Comments

  • Danial Behzadi
    Danial Behzadi over 1 year

    I decided to use rsync for backing up my downloaded torrents from my home-server to my laptop. I read the whole manual, but I didn't find a way to sync files automatically when a new file or directory is added to the complete torrents directory.

    The Best thing I could find was running rsync daily by a cron-job, But I want it to be more intelligent, like Ubuntu-One and do the job just when a new thing adds.