cancel
Showing results for 
Search instead for 
Did you mean: 

Change magento backup folder from /var/backup to different/external folder

Change magento backup folder from /var/backup to different/external folder

I need to change my backup directory to some other directory which is different from Magento installation root directory. How can i do this?

1 REPLY

Re: Change magento backup folder from /var/backup to different/external folder

You can make symbolic link. Let's say that your paths are:

 - Magento root: /var/www/html

 - Desired place for backup /mnt/backup

 

All you have to do in this case is to:

mv /var/www/html/var/backup /var/www/html/var/backup-temp
ln -s /mnt/backup /var/www/html/var/backup
cp -r /var/www/html/var/backup-temp/* /var/www/html/var/backup/
rm -rf /var/www/html/var/backup-temp

What I'm doing here:

 - moving the content of your current backup directory into backup-temp

 - making a symbolic link between /mnt/backup and Magento's backup location

 - copying existing files into a new backup directory and deleting the old one

 

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue