6

Is it possible to change the default Magento backup folder (var/backup/) to a different/external folder?

We want to keep the Magento folder as small as possible and save those backups in a different location.

3

You need to rewrite the model Mage_Backup_Model_Fs_Collection and replace this line

$this->_baseDir = Mage::getBaseDir('var') . DS . 'backups';

with the folder you want.

Also rewrite the helper Mage_Backup_Helper_Data and change the return of the method getBackupsDir. Make it return your folder.

| improve this answer | |
1

As Marius puts it - you have to edit model to specify new path (this is sad, would be great to be on config), but this puts you at risk during next Magento update. After Magento update your backups will start going to the same default location.

I'd create a filesystem symlink from magento_install/var/backups/ to your external (non-website) location.

ln -s /whatever_your_external_localtion/ ./backups/
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.