FIX exclude the pdf png preview files from backup
This commit is contained in:
parent
38fcfd38f8
commit
65e58943b3
@ -137,7 +137,7 @@ $dirtocompress = basename($fulldirtocompress);
|
|||||||
|
|
||||||
if ($compression == 'zip') {
|
if ($compression == 'zip') {
|
||||||
$file .= '.zip';
|
$file .= '.zip';
|
||||||
$excludefiles = '/(\.back|\.old|\.log|[\/\\\]temp[\/\\\]|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i';
|
$excludefiles = '/(\.back|\.old|\.log|\.pdf_preview-.*\.png|[\/\\\]temp[\/\\\]|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i';
|
||||||
|
|
||||||
//var_dump($fulldirtocompress);
|
//var_dump($fulldirtocompress);
|
||||||
//var_dump($outputdir."/".$file);exit;
|
//var_dump($outputdir."/".$file);exit;
|
||||||
@ -173,7 +173,7 @@ if ($compression == 'zip') {
|
|||||||
|
|
||||||
// We also exclude '/temp/' dir and 'documents/admin/documents'
|
// We also exclude '/temp/' dir and 'documents/admin/documents'
|
||||||
// We make escapement here and call executeCLI without escapement because we don't want to have the '*.log' escaped.
|
// We make escapement here and call executeCLI without escapement because we don't want to have the '*.log' escaped.
|
||||||
$cmd = "tar -cf ".escapeshellcmd($outputdir."/".$file)." --exclude-vcs --exclude-caches-all --exclude='temp' --exclude='*.log' --exclude='documents/admin/documents' -C '".escapeshellcmd(dol_sanitizePathName($dirtoswitch))."' '".escapeshellcmd(dol_sanitizeFileName($dirtocompress))."'";
|
$cmd = "tar -cf ".escapeshellcmd($outputdir."/".$file)." --exclude-vcs --exclude-caches-all --exclude='temp' --exclude='*.log' --exclude='*.pdf_preview-*.png' --exclude='documents/admin/documents' -C '".escapeshellcmd(dol_sanitizePathName($dirtoswitch))."' '".escapeshellcmd(dol_sanitizeFileName($dirtocompress))."'";
|
||||||
|
|
||||||
$result = $utils->executeCLI($cmd, $outputfile, 0, null, 1);
|
$result = $utils->executeCLI($cmd, $outputfile, 0, null, 1);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user