Hosting: Backing up your MediaTemple using rsync and a linux box

Follow these steps to setup a decent backup solution for your MT hosting (you can adapt this to any other hosting that offers SSH and RSYNC access).

First you'll want your linux box to be able to SSH into your hosting without a password using a SSH key instead.

Then, just clone the following repository somewhere in your linux box

https://github.com/PortNumber53/mt-utils

Customize the file:

mt.sh.sample

Next, make sure the variables in

0-variables.sh

match your enviroment.

Then you just need to run:

mt.sh.sample

For extra peace of mind, set it to run from a cron job.

 

 

/bin/bash: Remove Dreamweaver synchronization "stuff" from your hosting

As an online note, I’m writing this post to remind myself and help others that still suffer using Dreamweaver on a daily basis and at some point end up having a bunch of unwanted folders and files that Dreamweaver keeps for synchronization information. To remove all that from a Linux hosting (provide you have ssh access):

ssh to your server

for i in `find ./ | grep dwsync.xml`; do ls -l $i && rm $i; done
for i in `find ./ | grep '_notes'`; do ls -l $i && rmdir $i; done

inside your public html folder (the root folder would work just as well)

  • IGlr