More Backup Scripts (This time for wordpress)

I was able to complete my backup scripts for the WordPress site lickity split. I also found that grive in ports is broken and should be deprecated since the Google API it uses has been defunct since 2012. I had to download and compile grive2 from the interwebs (a quick search will yield success).

Here is a link to the wordpress backup script: WordPress Backup

And a link to the BSD version of the Google Drive backup script: GoogleDrive Backup Script (BSD). The BSD version points to /usr/local/bin/bash instead of /bin/bash, but that could likely be soft linked.

FYI, I pass the TARGETDIR in through the script’s args but here is an example of how my crontab looks like on the WordPress server:

0 0 * * * /home/brodey/src/Scripts/backupWordPressh.sh
30 0 * * * /home/brodey/src/Scripts/backupBSDFilesToGoogleDocs.sh /FreeNAS/WordPress

Yes, I’ll eventually have a “common place” for all of my scripts to run and better maintainability  but this is a “get something in place now” type of deal.

First things that I’m working on

Looks like I may be looking at a possible drive failure or, “normal” wear-in on one of my brand new hard drives (A 4TB Hitachi). I received a lovely error message from FreeNAS indicating that my drive error count increased from 0 to 1, so I shall be monitoring that count to see if it’s rate of increase changes.

In the mean time, and after taking manual backups of data. I decided to get some backup scripts in place so that I don’t have to continuously monitor the situation. I developed a simple script with a touch of ‘hard coding’ to get the job done for now, using a couple posts about grive and BASH.  Grive is awesome, grive -f is also equally awesome when forcing a “download” or “pull” from your Google Drive.

Here is a link to my backup script: Backup Script