SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Asynchronous deletes
Author Message
Post Asynchronous deletes 
So this morning's snapshot failed because by the time the cron job for
the daily snapshot came round, the weekly snapshot was still running. I
was kinda expecting this to happen :-)

Here's the log entries ...

[13/Nov/2004:23:55:02] /usr/local/bin/rsnapshot weekly: started
[13/Nov/2004:23:55:02] touch /var/run/rsnapshot
[13/Nov/2004:23:55:02] /bin/rm -rf
/Volumes/Terrorbackup/snapshots/weekly.4/
[14/Nov/2004:00:00:02] /usr/local/bin/rsnapshot daily: started
[14/Nov/2004:00:00:02] ERROR: Lockfile /var/run/rsnapshot exists,
can not continue!
[14/Nov/2004:02:08:53] mv /Volumes/Terrorbackup/snapshots/weekly.3/
/Volumes/Terrorbackup/snapshots/weekly.4/
...

The problem is that the 'rm -rf' in the weekly snapshot takes ages when
unlinking 1.2 million directory entries.

I believe this could be solved by instead of just running rm -rf, mv the
directory to a unique name, fork off the rm in the background, and then
remove the lockfile and exit. Then the daily snapshot could run in
parallel with no risk of the processes trampling on each others' data
and getting confused. Naturally, this would cause more disk thrashing
and make the daily backup go slower, but at least it would go!

Any thoughts on how this plan can be improved before I hack in a patch?

--
David Cantrell | London Perl Mongers Deputy Chief Heretic


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB