# Backup - export\_files.php - warning

**URL:** <https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302>\
**Category:** Maintaining my Dolibarr\
**Created:** [February 26, 2021, 9:16am UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302 "2021-02-26T09:16:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erwincort](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/e/76d3ee/32.png) [@erwincort](https://www.dolibarr.org/forum/u/erwincort)\
**Post date:** [February 26, 2021, 9:16am UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302/1 "2021-02-26T09:16:03Z")

</div>

Hello,

Since I did an upgrade to V13.0 and later to V13.0.1 I get a list of warnings when making a backup of the files.I select ZIP and then click on “Generate Backup”.  
The backup seems to be done, however I get a list of warnings like this:  
**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\xampp\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown modifier ‘]’ in **C:\htdocs\dolibarr\htdocs\core\lib\files.lib.php** on line **2167**

**Warning** : preg\_match(): Unknown mod …

Is this a known bug/issue and/or can I do something to resolve please?

regards,  
Erwin

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [February 26, 2021, 12:35pm UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302/2 "2021-02-26T12:35:03Z")

</div>

Hi,

I can not reproduce the error on my setup.

What is the PHP version ?

---

<div class="post-metadata">

**Author:** ![erwincort](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/e/76d3ee/32.png) [@erwincort](https://www.dolibarr.org/forum/u/erwincort)\
**Post date:** [February 26, 2021, 12:57pm UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302/3 "2021-02-26T12:57:43Z")

</div>

PHP 7.3.11

![image003.jpg](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/1/199468b2863c421b5962c8b3f425f0be473f2d0e.jpeg)

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [February 26, 2021, 4:08pm UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302/4 "2021-02-26T16:08:22Z")

</div>

Hello,

I have checked the code, there is no way to get this error.  
So for me, you have a corrupted php file, try to re-upload all the PHP files.

---

<div class="post-metadata">

**Author:** ![erwincort](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/e/76d3ee/32.png) [@erwincort](https://www.dolibarr.org/forum/u/erwincort)\
**Post date:** [March 1, 2021, 2:42pm UTC](https://www.dolibarr.org/forum/t/backup-export-files-php-warning/20302/5 "2021-03-01T14:42:05Z")

</div>

Hi,

I still was experiencing this warnings with a new install of 13.0.1. However in version 12 it does not occur.  
So I have been looking forward and in the end I changed the export\_files.php in line 117 with  
$ret = dol\_compress\_dir(DOL\_DATA\_ROOT, $outputdir."/".$file, $compression, ‘/(.back|.old|.log|/temp/|documents/|admin/)/’);

Now I have no issues any more. Any idea what is the root cause of here?

Grts,  
Erwin
