System administrators understand the code: Backup! Backup!! Backup!! You can never be bigger than a backup process. Today, I want to share a backup script which is use for backing up our Magento root directory at Furnish.NG. You can find the script on Github: https://github.com/FurnishNG/Magento-File-Backup-Script.
It’s been tested Ubuntu 14.04. Hope it will be useful to you as it’s been to us. Let me know your thoughts on this. Feedback on how to improve the script is welcomed. Thank you.
Nice one @Ndianabasi.
Nothing serious, but I noticed you didn’t need to first try to create the year directory first. ‘mkdir’ has a ‘-p’ switch to create directory recursively. That way, you can try to create the month directory straight.
Thank you for the observation @yomexzo. “mkdir -p” is used extensively throughout the script. I will create the BACKUP_DIR in one operation for the next commit.