
Originally Posted by
smoke133
I'm trying to exclude my images folder from being backup. I'm not sure if I'm doing right. I'm editing the archive.php in the classes folder. Here is what I have there.
PHP Code:
function exclude_files($list)
{
$temp = $this->list_files($list);
foreach ($temp as $current)
$this->exclude[] = $current;
$example->exclude_files("../images/*.*");
}
Is this correct?
Also it would be nice if there was a restore option, at least for the db.
No need to edit the class file.
To exclude more then one directory or file I had to change the exclude_files variable to an array. Note the changes below.
File YOUR_ADMIN/backup_zc.php
Find at line 62
PHP Code:
$exclude_files = '../cache/*.*'; // Exclude cache directory as default
Here is where you would add your list of directories/files that you want to exclude.
Replace with
PHP Code:
// Note each directroy or file name must be surrounded with double quotes and a single comma with no space separating each.
$exclude_files = array("../cache/*.*","../images/*.*");
This change is for the display of excluded.
Fine at line 388
PHP Code:
echo DIR_FILES_EXCLUDED.'<b>'. $exclude_files . '</b><br />';
Replace with
PHP Code:
echo DIR_FILES_EXCLUDED.'<b>'. implode(",",$exclude_files) . '</b><br />';
This change is to match backup_zc which will download the archive.
File YOUR_ADMIN/backup_zc_download.php
Find at line 61
PHP Code:
$exclude_files = '../cache/*.*'; // Exclude cache directory as default
Replace with
PHP Code:
// Note each directroy or file name must be surrounded with double quotes and a single comma with no space separating each.
$exclude_files = array("../cache/*.*","../images/*.*");
Also it would be nice if there was a restore option, at least for the db.
BackUp ZC uses Zen Carts information to understand the server and web site layout. So without a good working Zen Cart the restore can not be done. This is why there is no restore option at this time.
Skip
Bookmarks