If you want to archive your website, you only need to:
- Copy all files/directories in your web folder (e.g.
/var/www/html/
) - 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
Variables
- 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)
Example
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