Made to Order Software Corporation Logo

MO Backup: mo_backup.pages.inc File Reference

Module functions of the backup module. More...

Functions

 _mo_backup_run ($by_hand)
 Run a backup of this website.

 _mo_backup_exec ($cmd, &$output)
 Execute a command line instruction and save its output.


Detailed Description

This file actually defines the necessary functions to run a complete server-side backup.

Copyright (c) 2009-2011 Made to Order Software Corp.

http://www.m2osw.com/mo_backup contact@m2osw.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Function Documentation

_mo_backup_exec ( cmd,
&$  output 
)

This function calls exec() with a command line instruction.

It saves the output in the supplied array and emit a drupal error if the shell command fails (does not return 0.)

Parameters:
[in]$cmdThe command to execute
[in,out]$outputThe array with the output data
Returns:
TRUE if the command ran just fine

Referenced by _mo_backup_run().

_mo_backup_run ( by_hand)

This function is called whenever a user wants to run a backup immediately or CRON woke up and wants to run a backup.

Parameters:
[in]$by_handIf TRUE, the current user started the backup by hand

References _mo_backup_exec().

Referenced by mo_backup_cron(), and mo_backup_run().

Documentation generated by Doxygen on Sun Apr 8 2012 20:30:03