Use inotify to decrease system load and make backups instantaneously
Bug #162119 reported by
Asheesh Laroia
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://
To post a comment you must log in.
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/~timevaulte rs/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.INotifyCal lback, 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.