Please use xargs to speed up snapshot removal

Bug #1157639 reported by Paul Frederiks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Back In Time
Fix Released
Wishlist
Germar

Bug Description

The automatic removal of snapshots takes longer than necessary. I've set up backintime to take a snapshot every 10 minutes, but the smart removal of most of the snapshots of the day before yesterday block the second and third snapshot of the day.

A significant portion of that time is spend in find and chmod. It is possible to speed up this step by using xargs:

paul@Toren:/media/timemachine/backintime/Toren/paul/1$ time find 20130318-124002-222/ -type d -exec chmod u+wx {} \;

real 0m32.897s
user 0m0.812s
sys 0m5.860s

paul@Toren:/media/timemachine/backintime/Toren/paul/1$ time find 20130318-123002-824/ -type d -print0 | xargs -0 chmod u+wx

real 0m14.497s
user 0m0.236s
sys 0m2.152s

Those were two practically identical snapshots, so the only difference is the use of xargs instead of -exec.

Revision history for this message
Germar (germar) wrote :

If find version is >4.2.12 we could also use 'find ./ -type d -exec chmod u+wx {} +' which will do the same as xargs.
Dan what do you think?

Regards,
Germar

Germar (germar)
Changed in backintime:
status: New → Fix Committed
importance: Undecided → Wishlist
assignee: nobody → Germar (germar)
Germar (germar)
Changed in backintime:
status: Fix Committed → Fix Released
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.