Magento – Best way to BACKUP

backup

I installed the newest Magento version (1.9.1) on a linux server. I have the cPanel available to me in my cloud hosting package.

I remember some time back when I had a VPS hosting plan that something went wrong with my Magento shopping cart and I needed to have everything restored from a backup. I asked the hosting company to use the last backup (I had a 'once a day' backup plan back then) but they had a very difficult time restoring from the regular backup (something with the tables, the database or something or other). So – here is the million dollar question – I am now getting ready to install an extension via Magento Connect – How should I backup my entire Magento store? (files and database). Shall I download all my files via FTP or can I backup everything from the cPanel? What about the database?

Thank you very much for any suggestions. I know there are a lot of smart people out there who know this stuff (unlike me 🙂 )

Allysin

Best Answer

The absolute simplest method.

If you have SSH access and the disk space, the easiest way is to create a tarball (archive similar to windows Zip) of your webserver doc root and a compressed mysqldump of the database to a backup folder in your home directory (above your web server doc root so it's not web accessible).

Use SFTP to download the tarball and database backup to local storage. With only two files, it goes a lot quicker and is less likely to suffer errors than a long excruciating SFTP download of each individual file in the Magento installation.

Also, if you have Amazon Web Services, you can create an S3 bucket and use S3command to copy your backup files to that (goes the quickest)

(If you have a version of Magento that has System and Database backup, DO NOT USE THESE! They often knock your site offline with a 500 error do to messing with file permissions)

Related Topic