MAMP Pro to the cloud

After my my Mac decided to fuck up after installing Sierra, it gave me a chance to reorganise my shit as I forgot to backup my MAMP Pro installation, so I had to rebuild all 20+ web sites and databases from scratch. Not doing this again as it’s a right pain in the ass.

So after playing around a bit, I’ve moved the htdocs folder and the MySQL databases to Dropbox. I could use iCloud but I’m not installing that shit on my Workstation PC at home.

Before we go to Terminal, make sure MAMP and your MySQL management tool (phpmyadmin/Sequel Pro/Workbench) of choice is closed.

Copying the databases

If you want to use another cloud storage solution, here are the default install path for iCloud:
~/Library/Mobile\ Documents/com~apple~CloudDocs/

Google Drive:
~/Google\ Drive/

Microsoft OneDrive:
~/OneDrive/

Just replace the Dropbox path in these examples. So let’s copy the databases folder to Dropbox in a folder called MAMP_db.

cp -r /Library/Application\ Support/appsolute/MAMP\ PRO/db ~/Dropbox/MAMP_db

Rename the default folder to something else

mv /Library/Application\ Support/appsolute/MAMP\ PRO/db /Library/Application\ Support/appsolute/MAMP\ PRO/delete_db

Create a symbolic link to the new folder.

ln -s ~/Dropbox/MAMP_DB /Library/Application\ Support/appsolute/MAMP\ PRO/db

Now start MAMP Pro and wait to see if MySQL loads without errors. I double checked by loading Sequel Pro to see if my databases were there.

If you want to use iCloud instead, use

If that was a success, we can now move the web sites.

Copying the htdocs

Exactly the same commands, just a different folder.

cp -r /Applications/MAMP/htdocs ~/Dropbox/MAMP_htdocs
mv /Applications/MAMP/htdocs /Applications/MAMP/delete_htdocs
ln -s ~/Dropbox/MAMP_htdocs /Applications/MAMP/htdocs

Load MAMP Pro and click localhost and hey presto.

I did this on a fresh installation, and when tried to access localhost I got a Forbidden 403 error. All I did was make a new host and it worked fine.

My wallpaper collection

With no inspiration to write a rant, here’s a quick and dirty post to fill in the big gap on my WordPress post calendar.

I have a Design RSS feed which occasionally has something useful in there that doesn’t relate to massaging a rockstar/ninja/wizard (or any other adjective to describe these narcessitic fuckers) designers, like some nice images for background wallpapers.

This is wgere my OCD kicks in, but I like a consistent look across my desktop machine at home, my work Mac Book Pro and my work’s Mac Book Pro, so I have a folder on my OneDrive that has 300+ images that rotate every 20 minutes or so across the board.

So rather than doing the blindingly obvious and sharing that folder, I’ve copied them to My Google Photos and shared that as well. Why make life easy huh?

So click here to see my appalling taste and nerdiness in background wallpapers.

Save to Google Drive

This is the extension I’ve been waiting for, for so long.

Previously I’d use Springpad or Evernote to save a web page, but they’re limited on free accounts and I’ve got plenty of space on Skydrive, Dropbox, The Box and Cubby and Google Drive, so why not use that instead? Well it’s always been a manual process of

save-to-google-drive-extension-options

saving the page and copying to the sync folder (or using the mklink hack) so it’s not convenient if it’s at 5:30pm on a work day and you forget.

Enter Google and this stonking extension.