# Datenbank Backup per PHP Script

**URL:** <https://forum.shopware.com/t/datenbank-backup-per-php-script/103680>\
**Category:** Administration\
**Created:** [12. April 2024 um 05:51 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680 "2024-04-12T05:51:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shopware12](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@shopware12](https://forum.shopware.com/u/shopware12)\
**Post date:** [12. April 2024 um 05:51 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/1 "2024-04-12T05:51:01Z")

</div>

Hallo an Alle,

ich versuche gerade ein PHP-Script zu erstellen, welches mir täglich eine Backup-Datei der Datenbank erstellt (Shopware 6). Grundsätzlich funktioniert das auch:

$command = „mysqldump -h $mysql\_host --user=$mysql\_user --password=$mysql\_password $database | gzip \> $backup\_path$backup\_file“;

Mein Problem ist, dass ich nur Hieroglyphen sehe bei den ganzen Werten in den Feldern.  
Ich habe leider keine Ahnung, an was das liegen kann.

Kann mir bitte Jemand von euch auf die Sprünge helfen.  
Bin schon fast am verzweifeln, weil es einfach nicht klappen will.

Vielen Dank.

Stefan

---

<div class="post-metadata">

**Author:** ![MBDealer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/mbdealer/32/27217_2.png) [@MBDealer](https://forum.shopware.com/u/MBDealer)\
**Post date:** [12. April 2024 um 06:07 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/2 "2024-04-12T06:07:08Z")

</div>

Kannst du mal ein Beispiel posten?

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [12. April 2024 um 06:11 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/3 "2024-04-12T06:11:45Z")

</div>

> [@shopware12](#):
>
> Mein Problem ist, dass ich nur Hieroglyphen sehe bei den ganzen Werten in den Feldern.

Vielleicht den Dump mit Option `--hex-blob` erstellen.

---

<div class="post-metadata">

**Author:** ![shopware12](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@shopware12](https://forum.shopware.com/u/shopware12)\
**Post date:** [12. April 2024 um 06:24 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/4 "2024-04-12T06:24:42Z")

</div>

So sehen die Zeilen aus:  
(‚Bedienungsanleitung DE‘,NULL,‚2023-09-21 08:25:39.822‘,NULL,‚ä∂ÿ\>Áprá8∫3æ #Ÿ‘,'/ª\_‚‚öMp™XTŒ|„‚‚),  
(‚Bedienungsanleitung DE‘,NULL,‚2023-09-21 08:25:39.834‘,NULL,‚ä∂ÿ\>Ûraî\>¬ëClèŒ‘,‘/ª\_‚‚öMp™XTŒ|„‚‚),  
(‚Bedienungsanleitung DE‘,NULL,‚2023-09-21 08:25:39.846‘,NULL,‚ä∂ÿ\>ˇq‹î`\r¸y\>‘,‘/ª\_‚‚öMp™XTŒ|„‚‚),  
(‚Bedienungsanleitung DE‘,NULL,‚2023-09-21 08:25:39.859‘,NULL,‚ä∂ÿ?s’≥Õ∑#÷Õæ∫‘,‘/ª\_‚‚öMp™XTŒ|„‚'),

---

<div class="post-metadata">

**Author:** ![shopware12](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@shopware12](https://forum.shopware.com/u/shopware12)\
**Post date:** [12. April 2024 um 06:35 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/5 "2024-04-12T06:35:58Z")

</div>

@ R4M

Vielen herzlichen Dank!  
Mit hex-blob geht es super.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [12. Mai 2024 um 06:36 UTC](https://forum.shopware.com/t/datenbank-backup-per-php-script/103680/6 "2024-05-12T06:36:30Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
