Cloning Magento for emergency backup


I’m forced to leave Magento as CMS running my site. However, trying to be careful, I’d like to clone the whole thing.

That brings a few questions.

Is using magento backup enough to bring the whole page to its current state, after I deleted (and installed it back of course) it from the server?

Should I somehow clone the etire page and if so, should I simply download all the files and upload them again in event of going back to magento?

If you want to archive your website, you only need to:

  1. Copy all files/directories in your web folder (e.g. /var/www/html/)
  2. Do a mysqldump of your Database

Mysql Dumps (e.g. Mysql Backups)

The best (and my preferred) method. Run the following from the CLI:

mysqldump -u magento_user -p magento_database > backup_filename.sql


  • Variable 1: magento_user (name of the Magento database user)
  • Variable 2: magento_database (name of your Magento database)
  • Variable 3: backup_filename.sql (filename to save as)


mysqldump -u bob -p magento_main > magento_20200615.sql

Then you’ll be prompted for your magento_user password. The screen will “freeze” for a few minutes whilst it’s working and then prompt you to say it’s complete. It’ll save in whatever directory you run the command from. Doesn’t matter if you’re a superuser or not.

I think I go over this process in more detail here: How to migrate Magento 2 from one server to another