I do a lot of work on my Mac using a MAMP install. All of my code is written, tested, and stored here.
I made a major mistake today when testing the new beta version of WordPress – I overwrote my wp-content folder in WordPress! Unfortunately, there is no going back after this happens. Even Edit > Undo wasn’t going to work because I moved/replaced too many files.
The only option I had at that point was to bite the bullet, accept my losses, and revert to my latest backup – which was from 2 weeks ago. So, while a huge pain, 2 weeks of work lost isn’t the end of the world.
But there lies the problem: I’m not backing up my stuff often enough. And today I found a solution which should hopefully prevent these types of losses again.
On your Mac, there is a program called “Automator”. You can create “programs” in it (by dragging and dropping “actions”) which will automatically copy a folder, archive it, and move it onto an external hardrive for you. This saves a ton of time.
Here’s a screenshot of my backup program which will auto archive and move my wp-content directory:
Now the only step is to make it automatically run. I did this using the Calendar app on the Mac.
I set up an event that repeats every day and, using an “alert”, opens the program I made using the Automator. It looks like this:
So just like that, I now have automatic backup every single day – without needing to remember anything.