Report this

What is the reason for this report?

Backup a Magento Image store, including database

Posted on April 14, 2015

Hey,

Wondering if anyone has a solution to automatically backing a magento store and database which has been set up using the Magento Image Disk?

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey thanks.

I’ve used this function before, any ideas how I could store the backup offserver?

Cheers

In the Magento admin panel, there are a few options for backing up your system. This can be found under Systems -> Tools -> Backups

Backup

There are three options. System Backup both your database and your entire web folder. Database and Media Backup will backup your database and the media directory, while Database Backup you simply backup your database.

You could also do a manual backup of your database, from the commandline. For more information on backing up MySql, check out:

Heya,

Magento’s built-in backup functionality will come handy in this situation. You can then use rsinc or scp to transfer the backup to a remote server.

The run the backup, execute the following command:

bin/magento setup:backup --code --media --db

This command will create a backup of your Magento instance including code, media files, and the database.

Once the backup is created, you can use rsync to transfer the backup to another location. For example, if you want to transfer it to a remote server, you can use a command like this:

rsync -avz /path/to/your/magento/var/backups/ user@remote_server:/path/to/destination/

Replace /path/to/your/magento/var/backups/ with the actual path to your Magento backups directory, user with the username on the remote server, remote_server with the IP address or hostname of the remote server, and /path/to/destination/ with the destination directory on the remote server where you want to transfer the backup.

After the transfer is complete, verify that the backup files are present in the destination directory on the remote server.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.