Bacula-users

Re: [Bacula-users] Linux inotify

2012-10-17 07:53:42
Subject: Re: [Bacula-users] Linux inotify
From: "azurIt" <azurit AT pobox DOT sk>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 17 Oct 2012 13:51:39 +0200
Nothing which cannot be resolved.


>While it sounds helpful there are some problems to tackle:
>- Files changed before or while the FD is not running for example on  
>machine startup


This is the only problem which cannot be, probably, fixed - every solution has 
it's pluses and minuses.

FD can, for example, detect this situation, disable inotify and use standard FS 
scanning for next backup only.


>- Performance penalty on busy volumes by FD sorting/recording the changes


Yes, it's not suitable for everyone. Other people can say that scanning the 
whole filesystem once per day with several milions of small files is also doing 
huge load (=current FD behavior). Can be partially resolved by increasing the 
queue size and making delays in event processing.


>- Other limitations listed below
>
>(from manpage)
>Limitations and caveats
>
>Inotify monitoring of directories is not recursive: to monitor  
>subdirectories under a directory, additional watches must be created.  
>This can take a significant amount time for large directory trees.


This will be done only once - at FD startup.


>Note that the event queue can overflow. In this case, events are lost.  
>Robust applications should handle the possibility of lost events  
>gracefully.


$ cat /proc/sys/fs/inotify/max_queued_events
16384

Quite a lot i think (default value on Debian Squeeze), can be increased to 
1215752191.


>The inotify API identifies affected files by filename. However, by the  
>time an application processes an inotify event, the filename may  
>already have been deleted or renamed.


Delete and rename is also generating events so this is not a problem.

Btw, current FD is not able to detect rename (move) if accurate backup is not 
enabled. With inotify, it can be detected very easily.


>If monitoring an entire directory subtree, and a new subdirectory is  
>created in that tree, be aware that by the time you create a watch for  
>the new subdirectory, new files may already have been created in the  
>subdirectory. Therefore, you may want to scan the contents of the  
>subdirectory immediately after adding the watch.


You will backup the whole subdirectory anyway so no scan is needed.


>Regards
>
>Andreas
>
>
>
>------------------------------------------------------------------------------
>Everyone hates slow websites. So do we.
>Make your web apps faster with AppDynamics
>Download AppDynamics Lite for free today:
>http://p.sf.net/sfu/appdyn_sfd2d_oct
>_______________________________________________
>Bacula-users mailing list
>Bacula-users AT lists.sourceforge DOT net
>https://lists.sourceforge.net/lists/listinfo/bacula-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users