Quote from: xyzvisual at May 30, 2006, 05:21 PM
you dont need enything, only put the snipet and call in a very usage page and create a chmod 777 backup called directory. i dont undertand your quote
hi
when you take alook at your own snippet code it says that i need to do 2 steps the one above is step 2
when i copy the code into modx then i get a pars error that my root folder is not writable. I changed the $modx_backup_dir to say /Backup and made a folder in my root called Backup with 777 as chmod but still I get a pars error that my root folder (httpdocs) is not writable but I can not find an other setting where I can set the backup directory.
this is what I have now for my settings:
$WebGroup = 'admin';
$number_of_backups = 3;
if($modx->isMemberOfWebGroup($WebGroup) || $_SESSION['usertype']=="manager"){
$modx_root_dir =$modx->config['base_path'];
$mods_path = $modx->config['base_path'] . "assets/modules/";
$modx_backup_dir = $modx->config['base_path'] .'Backup/';
$modx_backup_dir2 = $modx->config['base_path'];
$archive_suffix = mktime(0, 0, 0, date("m"), date("d"), date("y"));
$archive_file = $modx_backup_dir.$archive_suffix.'_website_backup.zip';
$database_filename = $archive_suffix.'_database_backup.sql';
if (file_exists($archive_file)){}else{
/**
* Description:
* Backup modx files and compress into .zip for easy download
* @author Robin Stemp <[email protected]>
* @version 0.8 13-Feb-06 Added log tables, excluding log data.
* Added check for .htaccess file, backup directory.
* Added MODx Manager theme header (header.inc.php)
* More testing done.
* @version 0.5 11-Feb-2006, not heavily tested though
*
* Setup:
* 1. change $modx_backup_dir to directory for zip archives and make sure read/write permission is set for directory
* 2. change $modx_backup_dir in /assets/modules/modbak/download.php file, note download.php requires full path name
* ie /home/username/public_html/_backup/
I added the setup lines to show you what I mean
I have put the snippet in my home page template