I'm trying to come up with a way of ensuring that files on a server can't get modified while a backup is being performed. I need a method that would work for both manual and automatic (cron task) backups.
My server runs Linux Redhat 7.0/Apache 1.3.12, and I have full access to Apache.
One method would be to actually shut down Apache, but that has the disadvantage that to users, it would appear that the site is gone, and I'd prefer to display a "down for maintenance" message.
Here's a tentative approach:
Create and install an apache module down_maint.pm which does the following:
[code][/code]When doing a backup, first create the file "down_maint". After the backup is finished, delete the file.
Is there a better approach?