Use inotify to decrease system load and make backups instantaneously

Bug #162119 reported by Asheesh Laroia
4
Affects Status Importance Assigned to Milestone
TimeVault
New
Undecided
Unassigned

Bug Description

inotify (which has a Python module to access it) is a way to subscribe to directories or files and have your program be notified when they are changed. It would be great if timevault were to use inotify so it could pick up on changes automatically and have a mode to ensure a backup is made.

See http://www-128.ibm.com/developerworks/linux/library/l-inotify.html and http://www.kernel.org/pub/linux/kernel/people/rml/inotify/README for more information about how inotify is nice.

Revision history for this message
Daniel Stiner (danstiner) wrote :

If I remember correctly, TimeVault does in fact make extensive use of inotify for backups. It used inotify to listen for file changes. Once a file is changed, it further waits a specified amount of time after the change, to avoid making a backup of a file that is currently in use. Finally a backup is made of the changed file.

If you root around in the python source code (http://bazaar.launchpad.net/~timevaulters/timevault/trunk/annotate/head%3A/src/TimeVault/server.py), I believe you will find your suggestion already implemented, in lines such as self.watcher = watcher.Watcher(self.INotifyCallback, self.cfg)

I did not in any way develop TimeVault, but I did troubleshoot an issue we had with kernel limits on the number of inotify watches. It is in fact a fairly good way to ensure backups are made, but it is not perfect.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.