We use a little trick to save our web datas.
Our web site gets almost no connections after 00:00. At this hour a data 
area is updated.
So, from 00:00 all our cgi programs close the files instead of leaving them 
opened. As the server is almost empty, the disk cache works well, and 
response time is still correct.
At 01:00 the data area is updated once more time. If the login program found 
this data area has been filled with this second value, it shows a page 
indicating "maintenance".
So at 01:00 the files are generally all closed, and nobody can open new 
ones.
The backup program starts looping at 01:00 trying to lock (and unlock) every 
files. As soon as all files were successfully locked, or at 01:25 if locking 
was unsuccessfull, the backup begins with "save while active" option. So if 
all files were not closed (never happened), they are saved correctly. And in 
all cases, a program, which job is to clear the data area, was submitted 
just before the save commands, with a delay of 5 minutes. That means that 5 
minutes after the backup began (generally at 01:05), users can connect to 
the site ! The real downtime is 5 minutes... And our "maintenance" page 
indicates that the server is down for 5 to 30 mn. That's one of the "save 
while active" option advantages. As soon as the library is synchronized, you 
can go and update your files !
Not very complicated. In my case it was very easy, as I don't have a lot of 
cgi programs (almost 50). But it should not be a heavy task, even with lot 
of programs, as the job is simply to write the backup program, update the 
signon program, and almost copy (have to change file names...) the routine 
which reads the data area and close files in all other cgi-programs.

Regards,
Jean-Marc

----- Original Message ----- 
From: "sbc516" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 17, 2006 7:56 PM
Subject: [Easy400Group] How to backup web app files ?


> We are just starting to use CGIDEV2 to develop web applications,
> however, we are wondering how to go about backing up our files.
>
> We currently save our data nightly, however, our web apps do not close
> the files (as suggested for performance reasons) which locks the
> object and it doesn't get saved.
>
> We would like to keep our web apps running 24/7 if possible, but we
> may be willing to shut them down for a short period of time if
> necesary.
>
> We have read that some people use the "save while active" option while
> others just shut down their site.  What are the pro/cons of each?
>
> How are people backing up their web data?
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
> 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Easy400Group/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to