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