No project is ever fully completed.
I mean completely finished, when I reached the goal of my project.
If your script take longer than a few minutes, you will almost certainly have the browser report a timeout.
In fact it is not necessary to display line by line what happens.
The script takes several minutes, which is important for the user is to know where he is in the running of backup. And especially when the backup is finished.
I found the solution in the panel yum (thank you to cactus).
Basically I run the backup script in the background from my panel
I initiate a key in the db as a flag. (with this flag you can leave the panel for another)
I call a page with autorefresh of 10 seconds. (with this no timout occure)
The script complete a report with his progress.
The autorefresh page displays the report every 10 seconds.
When the script is finished, It remove the flag.
Autorefresh page gives way to the homepage of my panel with a message of success.
This part of the project is completed.
It now remains for me to do the restore.
Thanks for your interest
Olivier Beeckmans