Create a database backup

Gewijzigd op Do, 11 Dec om 1:19 PM

Create a database backup

DB backup script

If you are running Magento and you want to backup the database currently in use, you can execute inside a SSH shell:

~/bin/backup_mysql.php

The script will:

  • Read the database login details from your Magento config
  • Create a backup in ~/backup
  • Show you the name and size of the created backup

DB backup using N98-magerun

Magento 1.x

If you want to create a backup of your Magento 1.x database you can use n98-magerun, for example a development backup without customer data:

n98-magerun  db:dump  -c gzip  --strip=@development  ~/backup/db_dev.sql.gz

Magento 2.x

If you want to create a backup of your Magento 2.x database you can use n98-magerun2, for example a development backup without customer data: bash

n98-magerun2  db:dump  -c gzip  --strip=@development  ~/backup/db_dev.sql.gz

Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren