MageHost - Create a database backup

Gewijzigd op Tue, 20 Dec 2022 om 02:30 PM

Disclaimer: MageHost has joined forces with Savvii. Therefore, these articles are only relevant to existing MageHost customers. For more information on this, visit www.savvii.com/en/magehost.  


MageHost 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 you 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 you Magento 2.x database you can use n98-magerun2, for example a development backup without customer data:

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

Feedback verzonden

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