If you’re like me, you use your Macbook Pro computer for software development; more specifically PHP. This development requires a lot of configuration in an online environment. Major and security upgrades from Apple seem to always replace the current configuration files with their own default versions. This is a serious pain.
Specific Generic Files:
Not to mention any virtual host configs or other Apache config changes you’ve made.
Here is a shell script to back up some of these files. Your environment will probably require some additional configs, so hopefully this will save you a step or two in that process:
#!/bin/bash NOW=`date +"%Y%m%dT%H%M%S"` BACKUPDIR=~/Documents/conf_backups_$NOW mkdir -v $BACKUPDIR # Apache cp -vRf /etc/apache2 $BACKUPDIR/ # PHP cp -vf /etc/php.ini $BACKUPDIR/